# `Dagger.CurrentModule`
[🔗](https://github.com/dagger/dagger/blob/v0.21.7/sdk/elixir/lib/dagger/gen/current_module.ex#L2)

Reflective module API provided to functions at runtime.

# `t`

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

# `dependencies`

```elixir
@spec dependencies(t()) :: {:ok, [Dagger.Module.t()]} | {:error, term()}
```

The dependencies of the module.

# `generated_context_directory`

```elixir
@spec generated_context_directory(t()) :: Dagger.Directory.t()
```

The generated files and directories made on top of the module source's context directory.

# `generators`

```elixir
@spec generators(t(), [{:include, [String.t()]}]) :: Dagger.GeneratorGroup.t()
```

Return all generators defined by the module

> #### Experimental {: .warning}
>
> "This API is highly experimental and may be removed or replaced entirely."

# `id`

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

A unique identifier for this CurrentModule.

# `name`

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

The name of the module being executed in

# `source`

```elixir
@spec source(t()) :: Dagger.Directory.t()
```

The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).

# `workdir`

```elixir
@spec workdir(t(), String.t(),
  exclude: [String.t()],
  include: [String.t()],
  gitignore: boolean() | nil
) ::
  Dagger.Directory.t()
```

Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.

# `workdir_file`

```elixir
@spec workdir_file(t(), String.t()) :: Dagger.File.t()
```

Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.

---

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