Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/01_vfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ new Workspace({
Workspace where `fs` works against the local SQLite store but
`shell` throws.

`WorkspaceOptions` is `{ storage, backends, now? }`. There is no
`root`, `sandbox`, or `sessionId` field on the host facade — sandbox
wiring lives behind a `WorkspaceBackend`.
`WorkspaceOptions` includes the storage handle, optional backends,
clock, session id, mounts, observer, git identity, assets, artifacts,
and `useThink`. There is no `root` or `sandbox` field on the host
facade — sandbox wiring lives behind a `WorkspaceBackend`.

Set `useThink: true` when assigning the Workspace to
`Think.workspace`. This adds Think's string-oriented filesystem
compatibility methods (`readFile`, `readFileBytes`, `writeFile`,
`readDir`, `rm`, `glob`, `mkdir`, and `stat`) directly to that
Workspace instance while leaving the primary API on `workspace.fs`.

Illustrative layout (nothing below `/` is auto-created beyond
`ROOT_INODE` itself):
Expand Down
Loading
Loading