View Source Dagger.Directory (dagger v0.14.0)

A directory.

Summary

Functions

Load the directory as a Dagger module

Gets the difference between this directory and an another directory.

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.

Retrieves a directory at the given path.

Builds a new Docker container from this directory.

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

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

Retrieves a file at the given path.

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

A unique identifier for this Directory.

Force evaluation in the engine.

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

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

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

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

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

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

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

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

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

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

Types

@type t() :: %Dagger.Directory{client: term(), query_builder: term()}

Functions

Link to this function

as_module(directory, optional_args \\ [])

View Source
@spec as_module(t(),
  source_root_path: String.t() | nil,
  engine_version: String.t() | nil
) ::
  Dagger.Module.t()

Load the directory as a Dagger module

@spec diff(t(), t()) :: t()

Gets the difference between this directory and an another directory.

@spec digest(t()) :: {:ok, String.t()} | {:error, term()}

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.

Link to this function

directory(directory, path)

View Source
@spec directory(t(), String.t()) :: t()

Retrieves a directory at the given path.

Link to this function

docker_build(directory, optional_args \\ [])

View Source
@spec docker_build(t(),
  platform: Dagger.Platform.t() | nil,
  dockerfile: String.t() | nil,
  target: String.t() | nil,
  build_args: [Dagger.BuildArg.t()],
  secrets: [Dagger.SecretID.t()]
) :: Dagger.Container.t()

Builds a new Docker container from this directory.

Link to this function

entries(directory, optional_args \\ [])

View Source
@spec entries(t(), [{:path, String.t() | nil}]) ::
  {:ok, [String.t()]} | {:error, term()}

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

Link to this function

export(directory, path, optional_args \\ [])

View Source
@spec export(t(), String.t(), [{:wipe, boolean() | nil}]) ::
  {:ok, String.t()} | {:error, term()}

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

@spec file(t(), String.t()) :: Dagger.File.t()

Retrieves a file at the given path.

Link to this function

glob(directory, pattern)

View Source
@spec glob(t(), String.t()) :: {:ok, [String.t()]} | {:error, term()}

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

@spec id(t()) :: {:ok, Dagger.DirectoryID.t()} | {:error, term()}

A unique identifier for this Directory.

@spec sync(t()) :: {:ok, t()} | {:error, term()}

Force evaluation in the engine.

Link to this function

terminal(directory, optional_args \\ [])

View Source
@spec terminal(t(),
  cmd: [String.t()],
  experimental_privileged_nesting: boolean() | nil,
  insecure_root_capabilities: boolean() | nil,
  container: Dagger.ContainerID.t() | nil
) :: t()

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

Link to this function

with_directory(directory_, path, directory, optional_args \\ [])

View Source
@spec with_directory(t(), String.t(), t(),
  exclude: [String.t()],
  include: [String.t()]
) :: t()

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

Link to this function

with_file(directory, path, source, optional_args \\ [])

View Source
@spec with_file(t(), String.t(), Dagger.File.t(), [{:permissions, integer() | nil}]) ::
  t()

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

Link to this function

with_files(directory, path, sources, optional_args \\ [])

View Source
@spec with_files(t(), String.t(), [Dagger.FileID.t()], [
  {:permissions, integer() | nil}
]) :: t()

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

Link to this function

with_new_directory(directory, path, optional_args \\ [])

View Source
@spec with_new_directory(t(), String.t(), [{:permissions, integer() | nil}]) :: t()

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

Link to this function

with_new_file(directory, path, contents, optional_args \\ [])

View Source
@spec with_new_file(t(), String.t(), String.t(), [{:permissions, integer() | nil}]) ::
  t()

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

Link to this function

with_timestamps(directory, timestamp)

View Source
@spec with_timestamps(t(), integer()) :: t()

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

Link to this function

without_directory(directory, path)

View Source
@spec without_directory(t(), String.t()) :: t()

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

Link to this function

without_file(directory, path)

View Source
@spec without_file(t(), String.t()) :: t()

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

Link to this function

without_files(directory, paths)

View Source
@spec without_files(t(), [String.t()]) :: t()

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