# `Omni.Tools.FileSystem`
[🔗](https://github.com/aaronrussell/omni_tools/blob/v0.1.0/lib/omni/tools/file_system.ex#L1)

An `Omni.Tool` for file operations scoped to a base directory.

Provides read, write, patch, list, and delete commands over a
configurable directory. Configuration controls whether writes are
allowed and whether subdirectories are supported.

    # Full read-write access with nested subdirectories
    tool = Omni.Tools.FileSystem.new(base_dir: "/data/workspace")

    # Read-only access, flat (no subdirectories)
    tool = Omni.Tools.FileSystem.new(base_dir: "/data/docs", read_only: true, nested: false)

The tool delegates all operations to `Omni.Tools.FileSystem.FS`, which
can also be used independently of the tool machinery.

## Options

- `:base_dir` (required) — absolute path to an existing directory.
- `:read_only` — restricts to `read` and `list` only. Default `false`.
- `:nested` — allows subdirectory paths in ids. Default `true`.

# `new`

Builds a `%Omni.Tool{}` struct with a bound handler.

---

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