# `Fil.AlreadyExistsError`
[🔗](https://github.com/pehbehbeh/fil/blob/v0.1.0/lib/fil/exceptions.ex#L64)

A write with `if_exists: :error` found a file already there. Read that file and decide again.

    iex> disk = Fil.disk(adapter: Fil.Adapter.Memory)
    iex> Fil.write!(disk, "once.txt", "first")
    iex> {:error, %Fil.AlreadyExistsError{}} = Fil.write(disk, "once.txt", "second", if_exists: :error)

# `t`

```elixir
@type t() :: %Fil.AlreadyExistsError{
  __exception__: term(),
  disk: Fil.Disk.t() | nil,
  op: Fil.Op.name() | nil,
  path: String.t() | nil,
  reason: term()
}
```

