# `MingaEditor.Commands.FileTree.NewFileBackend`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/commands/file_tree/new_file_backend.ex#L1)

Injectable boundary for the New File command's fallible effects.

The command owns operation ordering and editor-state transitions. A backend only performs the requested filesystem or buffer operation so failures remain deterministic in tests.

# `t`

```elixir
@type t() :: module()
```

# `mkdir_p`

```elixir
@callback mkdir_p(String.t()) :: :ok | {:error, File.posix()}
```

# `open_buffer`

```elixir
@callback open_buffer(String.t(), Minga.Config.Options.server(), Minga.Events.registry()) ::
  {:ok, pid()} | {:error, term()}
```

# `touch`

```elixir
@callback touch(String.t()) :: :ok | {:error, File.posix()}
```

---

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