Skip to content

Interface: LocalFileSystemOptions

Options for LocalFileSystem.

optional contained?: boolean

Keep every resolved path under root. Defaults to true. When false, absolute input paths are accepted as-is (no sandbox).


optional createRoot?: boolean

Create root (and parents) during init. Defaults to true.


optional id?: string

Unique identifier. Defaults to a stable hash of the absolute root.


optional os?: ResolveOsPathsOptions

Injectables forwarded to resolveLocalRoot for ~ expansion (home / temp / cwd overrides). Mainly for tests: bun’s os.homedir() ignores a process-set HOME, so overriding home via { os: { homeDir } } is the runtime-agnostic way to point a ~ root at a chosen directory.


optional readOnly?: boolean

Block all write operations. Defaults to false.


root: string

Root directory on disk. Relative paths resolve against process.cwd(). ~ / ~/... expand via os.homedir() (before HOME), App /home/app, or a created ./.home (create failures skip). Stored on LocalFileSystem.root in POSIX form.