# `SmolBox.Files`
[🔗](https://github.com/hfiguera/smolbox/blob/v0.1.3/lib/smolbox/files.ex#L1)

Guest workspace paths and byte digests.

File operations are confined lexically to `/workspace`. This validation does
not resolve guest symlinks; the file transport and host artifact store must
enforce their own filesystem boundary. Percent signs, backslashes, traversal,
repeated separators, and non-UTF-8 paths are deliberately unsupported.

# `encode_path`

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

Encode a validated guest path for the worker's wildcard file route.

# `sha256`

```elixir
@spec sha256(binary()) :: String.t()
```

Compute a lowercase SHA-256 digest of file bytes.

# `validate_path`

```elixir
@spec validate_path(term()) :: :ok | {:error, SmolBox.Error.t()}
```

---

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