# `Ankusa.BlobStore.LocalFS`
[🔗](https://github.com/jamescarr/ankusa/blob/ankusa-v0.7.0/packages/ankusa/lib/ankusa/blob_store/local_fs.ex#L1)

Default `Ankusa.BlobStore`: immutable objects on the local filesystem.

Objects live under `opts[:root]` (an absolute path), by default
`Config.path(config, "segments")`. A dedicated claim store
(`claim_check.blob_stores: [{LocalFS, root: "/shared/claims"}]`) points it
elsewhere — at a directory every node and the gateway mount, say.

Writes are atomic (temp file + rename) and durable (file and directory
fsyncs), so a reader never sees a half-written object and a committed one
survives power loss. Reads use `:file.pread/3` for a single-record range
`GET` without slurping the whole object into memory.

# `root`

```elixir
@spec root(atom(), keyword()) :: String.t()
```

The directory objects live under: `opts[:root]`, else the instance's `segments` dir.

---

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