class Workspace extends AbstractObject implements IdAble

A Dagger workspace detected from the current working 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

string
clientId()

The client ID that owns this workspace's host filesystem.

directory(string $path, array|null $exclude = null, array|null $include = null, bool|null $gitignore = false)

Returns a Directory from the workspace.

file(string $path)

Returns a File from the workspace.

string
findUp(string $name, string|null $from = '.')

Search for a file or directory by walking up from the start path within the workspace.

id()

A unique identifier for this Workspace.

string
root()

Absolute path to the workspace root directory.

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
string clientId()

The client ID that owns this workspace's host filesystem.

Return Value

string

at line 30
Directory directory(string $path, array|null $exclude = null, array|null $include = null, bool|null $gitignore = false)

Returns a Directory from the workspace.

Path is relative to workspace root. Use "." for the root directory.

Parameters

string $path
array|null $exclude
array|null $include
bool|null $gitignore

Return Value

Directory

at line 55
File file(string $path)

Returns a File from the workspace.

Path is relative to workspace root.

Parameters

string $path

Return Value

File

at line 69
string findUp(string $name, string|null $from = '.')

Search for a file or directory by walking up from the start path within the workspace.

Returns the path relative to the workspace root if found, or null if not found.

The search stops at the workspace root and will not traverse above it.

Parameters

string $name
string|null $from

Return Value

string

at line 82
AbstractId id()

A unique identifier for this Workspace.

Return Value

AbstractId

at line 91
string root()

Absolute path to the workspace root directory.

Return Value

string