# `Dagger.EnvFile`
[🔗](https://github.com/dagger/dagger/blob/v0.20.5/sdk/elixir/lib/dagger/gen/env_file.ex#L2)

A collection of environment variables.

# `t`

```elixir
@type t() :: %Dagger.EnvFile{client: term(), query_builder: term()}
```

# `as_file`

```elixir
@spec as_file(t()) :: Dagger.File.t()
```

Return as a file

# `exists`

```elixir
@spec exists(t(), String.t()) :: {:ok, boolean()} | {:error, term()}
```

Check if a variable exists

# `get`

```elixir
@spec get(t(), String.t(), [{:raw, boolean() | nil}]) ::
  {:ok, String.t()} | {:error, term()}
```

Lookup a variable (last occurrence wins) and return its value, or an empty string

# `id`

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

A unique identifier for this EnvFile.

# `namespace`

```elixir
@spec namespace(t(), String.t()) :: t()
```

Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello

# `variables`

```elixir
@spec variables(t(), [{:raw, boolean() | nil}]) ::
  {:ok, [Dagger.EnvVariable.t()]} | {:error, term()}
```

Return all variables

# `with_variable`

```elixir
@spec with_variable(t(), String.t(), String.t()) :: t()
```

Add a variable

# `without_variable`

```elixir
@spec without_variable(t(), String.t()) :: t()
```

Remove all occurrences of the named variable

---

*Consult [api-reference.md](api-reference.md) for complete listing*
