class Directory extends AbstractObject implements IdAble

A directory.

Properties

$lastQuery from  AbstractObject

Methods

__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

asModule(string|null $sourceRootPath = '.')

Load the directory as a Dagger module source

asModuleSource(string|null $sourceRootPath = '.')

Load the directory as a Dagger module source

diff(Directory $other)

Gets the difference between this directory and an another 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(Platform|null $platform = null, string|null $dockerfile = 'Dockerfile', string|null $target = '', array|null $buildArgs = null, array|null $secrets = null)

Builds a new Docker container from this directory.

array
entries(string|null $path = null)

Returns a list of files and directories at the given path.

string
export(string $path, bool|null $wipe = false)

Writes the contents of the directory to a path on the host.

file(string $path)

Retrieves a file at the given path.

array
glob(string $pattern)

Returns a list of files and directories that matche the given pattern.

id()

A unique identifier for this Directory.

sync()

Force evaluation in the engine.

terminal(array|null $cmd = null, bool|null $experimentalPrivilegedNesting = false, bool|null $insecureRootCapabilities = false, Container|null $container = null)

Opens an interactive terminal in new container with this directory mounted inside.

withDirectory(string $path, Directory $directory, array|null $exclude = null, array|null $include = null)

Retrieves this directory plus a directory written at the given path.

withFile(string $path, File $source, int|null $permissions = null)

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)

Retrieves this directory plus a new file written at the given path.

withTimestamps(int $timestamp)

Retrieves this directory with all file/dir timestamps set to the given time.

withoutDirectory(string $path)

Retrieves this directory with the directory at the given path removed.

withoutFile(string $path)

Retrieves this directory with the file at the given path removed.

withoutFiles(array $paths)

Retrieves this directory with the files at the given paths removed.

Details

in AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

Parameters

AbstractClient $client
QueryBuilderChain $queryBuilderChain

in AbstractObject at line 19
protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

Parameters

QueryBuilder $leafQueryBuilder
string $leafKey

Return Value

null|array|string|int|float|bool

at line 19
Module asModule(string|null $sourceRootPath = '.')

Load the directory as a Dagger module source

Parameters

string|null $sourceRootPath

Return Value

Module

at line 31
ModuleSource asModuleSource(string|null $sourceRootPath = '.')

Load the directory as a Dagger module source

Parameters

string|null $sourceRootPath

Return Value

ModuleSource

at line 43
Directory diff(Directory $other)

Gets the difference between this directory and an another directory.

Parameters

Directory $other

Return Value

Directory

at line 53
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.

Return Value

string

at line 62
Directory directory(string $path)

Retrieves a directory at the given path.

Parameters

string $path

Return Value

Directory

at line 72
Container dockerBuild(Platform|null $platform = null, string|null $dockerfile = 'Dockerfile', string|null $target = '', array|null $buildArgs = null, array|null $secrets = null)

Builds a new Docker container from this directory.

Parameters

Platform|null $platform
string|null $dockerfile
string|null $target
array|null $buildArgs
array|null $secrets

Return Value

Container

at line 101
array entries(string|null $path = null)

Returns a list of files and directories at the given path.

Parameters

string|null $path

Return Value

array

at line 113
string export(string $path, bool|null $wipe = false)

Writes the contents of the directory to a path on the host.

Parameters

string $path
bool|null $wipe

Return Value

string

at line 126
File file(string $path)

Retrieves a file at the given path.

Parameters

string $path

Return Value

File

at line 136
array glob(string $pattern)

Returns a list of files and directories that matche the given pattern.

Parameters

string $pattern

Return Value

array

at line 146
AbstractId id()

A unique identifier for this Directory.

Return Value

AbstractId

at line 155
DirectoryId sync()

Force evaluation in the engine.

Return Value

DirectoryId

at line 164
Directory terminal(array|null $cmd = null, bool|null $experimentalPrivilegedNesting = false, bool|null $insecureRootCapabilities = false, Container|null $container = null)

Opens an interactive terminal in new container with this directory mounted inside.

Parameters

array|null $cmd
bool|null $experimentalPrivilegedNesting
bool|null $insecureRootCapabilities
Container|null $container

Return Value

Directory

at line 189
Directory withDirectory(string $path, Directory $directory, array|null $exclude = null, array|null $include = null)

Retrieves this directory plus a directory written at the given path.

Parameters

string $path
Directory $directory
array|null $exclude
array|null $include

Return Value

Directory

at line 210
Directory withFile(string $path, File $source, int|null $permissions = null)

Retrieves this directory plus the contents of the given file copied to the given path.

Parameters

string $path
File $source
int|null $permissions

Return Value

Directory

at line 224
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.

Parameters

string $path
array $sources
int|null $permissions

Return Value

Directory

at line 238
Directory withNewDirectory(string $path, int|null $permissions = 420)

Retrieves this directory plus a new directory created at the given path.

Parameters

string $path
int|null $permissions

Return Value

Directory

at line 251
Directory withNewFile(string $path, string $contents, int|null $permissions = 420)

Retrieves this directory plus a new file written at the given path.

Parameters

string $path
string $contents
int|null $permissions

Return Value

Directory

at line 265
Directory withTimestamps(int $timestamp)

Retrieves this directory with all file/dir timestamps set to the given time.

Parameters

int $timestamp

Return Value

Directory

at line 275
Directory withoutDirectory(string $path)

Retrieves this directory with the directory at the given path removed.

Parameters

string $path

Return Value

Directory

at line 285
Directory withoutFile(string $path)

Retrieves this directory with the file at the given path removed.

Parameters

string $path

Return Value

Directory

at line 295
Directory withoutFiles(array $paths)

Retrieves this directory with the files at the given paths removed.

Parameters

array $paths

Return Value

Directory