ReadOnlyFileSystem
Capability wrapper that enforces read-only access at the filesystem boundary. This matters for mixed workspaces: prompt/tool policy alone cannot protect a knowledge mount when another mount intentionally accepts writes.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ReadOnlyFileSystem(source): ReadOnlyFileSystem;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”ReadOnlyFileSystem
Properties
Section titled “Properties”readOnly
Section titled “readOnly”readonly readOnly: true = true;source
Section titled “source”readonly source: FileSystem;Methods
Section titled “Methods”appendFile()
Section titled “appendFile()”appendFile(path, _content): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”cp( _src, dest,_options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”exists()
Section titled “exists()”exists(path): Promise<boolean>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”glob()
Section titled “glob()”glob(pattern): Promise<string[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”lstat()
Section titled “lstat()”lstat(path): Promise<FsStat>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<FsStat>
Implementation of
Section titled “Implementation of”mkdir()
Section titled “mkdir()”mkdir(path, _options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”mv(_src, dest): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”readdir()
Section titled “readdir()”readdir(path): Promise<string[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”readdirWithFileTypes()
Section titled “readdirWithFileTypes()”readdirWithFileTypes(path): Promise<FileSystemDirent[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<FileSystemDirent[]>
Implementation of
Section titled “Implementation of”FileSystem.readdirWithFileTypes
readFile()
Section titled “readFile()”readFile(path): Promise<string>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”readFileBytes()
Section titled “readFileBytes()”readFileBytes(path): Promise<Uint8Array<ArrayBufferLike>>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Implementation of
Section titled “Implementation of”readlink()
Section titled “readlink()”readlink(path): Promise<string>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”realpath()
Section titled “realpath()”realpath(path): Promise<string>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”resolvePath()
Section titled “resolvePath()”resolvePath(base, path): string;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”rm(path, _options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”stat()
Section titled “stat()”stat(path): Promise<FsStat>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<FsStat>
Implementation of
Section titled “Implementation of”symlink()
Section titled “symlink()”symlink(_target, linkPath): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”writeFile()
Section titled “writeFile()”writeFile(path, _content): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”writeFileBytes()
Section titled “writeFileBytes()”writeFileBytes(path, _content): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>