View Source Dagger.File (dagger v0.12.2)

A file.

Summary

Functions

Retrieves the contents of the file.

Writes the file to a file path on the host.

A unique identifier for this File.

Retrieves the name of the file.

Retrieves the size of the file, in bytes.

Force evaluation in the engine.

Retrieves this file with its name set to the given name.

Retrieves this file with its created/modified timestamps set to the given time.

Types

@type t() :: %Dagger.File{client: term(), selection: term()}

Functions

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

Retrieves the contents of the file.

Link to this function

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

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

Writes the file to a file path on the host.

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

A unique identifier for this File.

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

Retrieves the name of the file.

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

Retrieves the size of the file, in bytes.

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

Force evaluation in the engine.

@spec with_name(t(), String.t()) :: t()

Retrieves this file with its name set to the given name.

Link to this function

with_timestamps(file, timestamp)

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

Retrieves this file with its created/modified timestamps set to the given time.