# `Mix.Statifier.Corpus.Files`
[🔗](https://github.com/riddler/statifier-ex/blob/v2.6.0/lib/mix/statifier/corpus/files.ex#L1)

The corpus emitter's file reads and writes, in one place, each returning a
sentence naming the file instead of raising.

Mix task support, run under `mix` on a developer's machine against paths in
this repository or its gitignored scratch tree: no path here is
attacker-controlled, and nothing under `lib/mix/` is in the released package
(`mix.exs`'s package files list). That is the justification for the
`@sobelow_skip` on each function below; every other Sobelow check stays live
on the module.

# `read`

```elixir
@spec read(path :: Path.t()) :: {:ok, binary()} | {:error, String.t()}
```

Reads `path`, or returns a sentence naming it.

# `write`

```elixir
@spec write(path :: Path.t(), content :: iodata()) :: :ok | {:error, String.t()}
```

Writes `content` to `path`, creating its directory, or returns a sentence naming it.

---

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