# `Agentic.Storage.Backend`

Behaviour for storage backend implementations.

Formalizes the implicit 8-function contract that `Storage.Local` already
implements. `Storage.Context` delegates to a backend module resolved by atom.

# `dir?`

```elixir
@callback dir?(config :: map(), path :: String.t()) :: boolean()
```

# `exists?`

```elixir
@callback exists?(config :: map(), path :: String.t()) :: boolean()
```

# `ls`

```elixir
@callback ls(config :: map(), path :: String.t()) ::
  {:ok, [String.t()]} | {:error, term()}
```

# `materialize_local`

```elixir
@callback materialize_local(config :: map(), path :: String.t()) ::
  {:ok, String.t()} | {:error, term()}
```

# `mkdir_p`

```elixir
@callback mkdir_p(config :: map(), path :: String.t()) :: :ok | {:error, term()}
```

# `read`

```elixir
@callback read(config :: map(), path :: String.t()) ::
  {:ok, String.t()} | {:error, term()}
```

# `rm_rf`

```elixir
@callback rm_rf(config :: map(), path :: String.t()) :: :ok
```

# `write`

```elixir
@callback write(config :: map(), path :: String.t(), content :: String.t()) ::
  :ok | {:error, term()}
```

---

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