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

A comparison between two directories representing changes that can be applied.

# `t`

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

# `added_paths`

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

Files and directories that were added in the newer directory.

# `after_`

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

The newer/upper snapshot.

# `as_patch`

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

Return a Git-compatible patch of the changes

# `before`

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

The older/lower snapshot to compare against.

# `empty?`

```elixir
@spec empty?(t()) :: {:ok, boolean()} | {:error, term()}
```

Returns true if the changeset is empty (i.e. there are no changes).

# `export`

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

Applies the diff represented by this changeset to a path on the host.

# `id`

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

A unique identifier for this Changeset.

# `layer`

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

Return a snapshot containing only the created and modified files

# `modified_paths`

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

Files and directories that existed before and were updated in the newer directory.

# `removed_paths`

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

Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.

# `sync`

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

Force evaluation in the engine.

---

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