docs/static/reference/php/Dagger/Directory.html
class Directory extends AbstractObject implements IdAble
A directory.
| | $lastQuery | | from AbstractObject |
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)
No description
from AbstractObject
null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)
No description
from AbstractObject
asGit()
Converts this directory to a local git repository
asModule(string|null $sourceRootPath = '.')
Load the directory as a Dagger module source
asModuleSource(string|null $sourceRootPath = '.')
Load the directory as a Dagger module source
changes(Directory $from)
Return the difference between this directory and another directory, typically an older snapshot.
chown(string $path, string $owner)
Change the owner of the directory contents recursively.
diff(Directory $other)
Return the difference between this directory and an another directory. The difference is encoded as a directory.
string
digest()
Return the directory's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
directory(string $path)
Retrieves a directory at the given path.
dockerBuild(string|null $dockerfile = 'Dockerfile', Platform|null $platform = null, array|null $buildArgs = null, string|null $target = '', array|null $secrets = null, bool|null $noInit = false, Socket|null $ssh = null)
Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features.
array
entries(string|null $path = null)
Returns a list of files and directories at the given path.
bool
exists(string $path, ExistsType|null $expectedType = null, bool|null $doNotFollowSymlinks = false)
check if a file or directory exists
string
export(string $path, bool|null $wipe = false)
Writes the contents of the directory to a path on the host.
file(string $path)
Retrieve a file at the given path.
filter(array|null $exclude = null, array|null $include = null, bool|null $gitignore = false)
Return a snapshot with some paths included or excluded
string
findUp(string $name, string $start)
Search up the directory tree for a file or directory, and return its path. If no match, return null
array
glob(string $pattern)
Returns a list of files and directories that matche the given pattern.
id()
A unique identifier for this Directory.
string
name()
Returns the name of the directory.
array
search(string $pattern, array|null $paths = null, array|null $globs = null, bool|null $literal = false, bool|null $multiline = false, bool|null $dotall = false, bool|null $insensitive = false, bool|null $skipIgnored = false, bool|null $skipHidden = false, bool|null $filesOnly = false, int|null $limit = null)
Searches for content matching the given regular expression or literal string.
stat(string $path, bool|null $doNotFollowSymlinks = false)
Return file status
sync()
Force evaluation in the engine.
terminal(Container|null $container = null, array|null $cmd = null, bool|null $experimentalPrivilegedNesting = false, bool|null $insecureRootCapabilities = false)
Opens an interactive terminal in new container with this directory mounted inside.
withChanges(Changeset $changes)
Return a directory with changes from another directory applied to it.
withDirectory(string $path, Directory $source, array|null $exclude = null, array|null $include = null, bool|null $gitignore = false, string|null $owner = '')
Return a snapshot with a directory added
withError(string $err)
Raise an error.
withFile(string $path, File $source, int|null $permissions = null, string|null $owner = '')
Retrieves this directory plus the contents of the given file copied to the given path.
withFiles(string $path, array $sources, int|null $permissions = null)
Retrieves this directory plus the contents of the given files copied to the given path.
withNewDirectory(string $path, int|null $permissions = 420)
Retrieves this directory plus a new directory created at the given path.
withNewFile(string $path, string $contents, int|null $permissions = 420)
Return a snapshot with a new file added
withPatch(string $patch)
Retrieves this directory with the given Git-compatible patch applied.
withPatchFile(File $patch)
Retrieves this directory with the given Git-compatible patch file applied.
withSymlink(string $target, string $linkName)
Return a snapshot with a symlink
withTimestamps(int $timestamp)
Retrieves this directory with all file/dir timestamps set to the given time.
withoutDirectory(string $path)
Return a snapshot with a subdirectory removed
withoutFile(string $path)
Return a snapshot with a file removed
withoutFiles(array $paths)
Return a snapshot with files removed
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain) No description
| AbstractClient | $client | | | QueryBuilderChain | $queryBuilderChain | |
protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)No description
| QueryBuilder | $leafQueryBuilder | | | string | $leafKey | |
| null|array|string|int|float|bool | |
GitRepository asGit()Converts this directory to a local git repository
| GitRepository | |
Module asModule(string|null $sourceRootPath = '.')Load the directory as a Dagger module source
| string|null | $sourceRootPath | |
| Module | |
ModuleSource asModuleSource(string|null $sourceRootPath = '.')Load the directory as a Dagger module source
| string|null | $sourceRootPath | |
| ModuleSource | |
Changeset changes(Directory $from)Return the difference between this directory and another directory, typically an older snapshot.
The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
| Directory | $from | |
| Changeset | |
Directory chown(string $path, string $owner)Change the owner of the directory contents recursively.
| string | $path | | | string | $owner | |
| Directory | |
Directory diff(Directory $other)Return the difference between this directory and an another directory. The difference is encoded as a directory.
| Directory | $other | |
| Directory | |
string digest()Return the directory's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
| string | |
Directory directory(string $path)Retrieves a directory at the given path.
| string | $path | |
| Directory | |
Container dockerBuild(string|null $dockerfile = 'Dockerfile', Platform|null $platform = null, array|null $buildArgs = null, string|null $target = '', array|null $secrets = null, bool|null $noInit = false, Socket|null $ssh = null)Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features.
| string|null | $dockerfile | | | Platform|null | $platform | | | array|null | $buildArgs | | | string|null | $target | | | array|null | $secrets | | | bool|null | $noInit | | | Socket|null | $ssh | |
| Container | |
array entries(string|null $path = null)Returns a list of files and directories at the given path.
| string|null | $path | |
| array | |
bool exists(string $path, ExistsType|null $expectedType = null, bool|null $doNotFollowSymlinks = false)check if a file or directory exists
| string | $path | | | ExistsType|null | $expectedType | | | bool|null | $doNotFollowSymlinks | |
| bool | |
string export(string $path, bool|null $wipe = false)Writes the contents of the directory to a path on the host.
| string | $path | | | bool|null | $wipe | |
| string | |
File file(string $path)Retrieve a file at the given path.
| string | $path | |
| File | |
Directory filter(array|null $exclude = null, array|null $include = null, bool|null $gitignore = false)Return a snapshot with some paths included or excluded
| array|null | $exclude | | | array|null | $include | | | bool|null | $gitignore | |
| Directory | |
string findUp(string $name, string $start)Search up the directory tree for a file or directory, and return its path. If no match, return null
| string | $name | | | string | $start | |
| string | |
array glob(string $pattern)Returns a list of files and directories that matche the given pattern.
| string | $pattern | |
| array | |
AbstractId id()A unique identifier for this Directory.
| AbstractId | |
string name()Returns the name of the directory.
| string | |
array search(string $pattern, array|null $paths = null, array|null $globs = null, bool|null $literal = false, bool|null $multiline = false, bool|null $dotall = false, bool|null $insensitive = false, bool|null $skipIgnored = false, bool|null $skipHidden = false, bool|null $filesOnly = false, int|null $limit = null)Searches for content matching the given regular expression or literal string.
Uses Rust regex syntax; escape literal ., [,], {, }, | with backslashes.
| string | $pattern | | | array|null | $paths | | | array|null | $globs | | | bool|null | $literal | | | bool|null | $multiline | | | bool|null | $dotall | | | bool|null | $insensitive | | | bool|null | $skipIgnored | | | bool|null | $skipHidden | | | bool|null | $filesOnly | | | int|null | $limit | |
| array | |
Stat stat(string $path, bool|null $doNotFollowSymlinks = false)Return file status
| string | $path | | | bool|null | $doNotFollowSymlinks | |
| Stat | |
DirectoryId sync()Force evaluation in the engine.
| DirectoryId | |
Directory terminal(Container|null $container = null, array|null $cmd = null, bool|null $experimentalPrivilegedNesting = false, bool|null $insecureRootCapabilities = false)Opens an interactive terminal in new container with this directory mounted inside.
| Container|null | $container | | | array|null | $cmd | | | bool|null | $experimentalPrivilegedNesting | | | bool|null | $insecureRootCapabilities | |
| Directory | |
Directory withChanges(Changeset $changes)Return a directory with changes from another directory applied to it.
| Changeset | $changes | |
| Directory | |
Directory withDirectory(string $path, Directory $source, array|null $exclude = null, array|null $include = null, bool|null $gitignore = false, string|null $owner = '')Return a snapshot with a directory added
| string | $path | | | Directory | $source | | | array|null | $exclude | | | array|null | $include | | | bool|null | $gitignore | | | string|null | $owner | |
| Directory | |
Directory withError(string $err)Raise an error.
| string | $err | |
| Directory | |
Directory withFile(string $path, File $source, int|null $permissions = null, string|null $owner = '')Retrieves this directory plus the contents of the given file copied to the given path.
| string | $path | | | File | $source | | | int|null | $permissions | | | string|null | $owner | |
| Directory | |
Directory withFiles(string $path, array $sources, int|null $permissions = null)Retrieves this directory plus the contents of the given files copied to the given path.
| string | $path | | | array | $sources | | | int|null | $permissions | |
| Directory | |
Directory withNewDirectory(string $path, int|null $permissions = 420)Retrieves this directory plus a new directory created at the given path.
| string | $path | | | int|null | $permissions | |
| Directory | |
Directory withNewFile(string $path, string $contents, int|null $permissions = 420)Return a snapshot with a new file added
| string | $path | | | string | $contents | | | int|null | $permissions | |
| Directory | |
Directory withPatch(string $patch)Retrieves this directory with the given Git-compatible patch applied.
| string | $patch | |
| Directory | |
Directory withPatchFile(File $patch)Retrieves this directory with the given Git-compatible patch file applied.
| File | $patch | |
| Directory | |
Directory withSymlink(string $target, string $linkName)Return a snapshot with a symlink
| string | $target | | | string | $linkName | |
| Directory | |
Directory withTimestamps(int $timestamp)Retrieves this directory with all file/dir timestamps set to the given time.
| int | $timestamp | |
| Directory | |
Directory withoutDirectory(string $path)Return a snapshot with a subdirectory removed
| string | $path | |
| Directory | |
Directory withoutFile(string $path)Return a snapshot with a file removed
| string | $path | |
| Directory | |
Directory withoutFiles(array $paths)Return a snapshot with files removed
| array | $paths | |
| Directory | |
Generated by Doctum, a API Documentation generator and fork of Sami.