export interface FileSystemStat { isFile: boolean; isDirectory: boolean; isSymbolicLink: boolean; mode?: number; size: number; mtimeMs: number; } export interface FileSystemReadOptions { /** Refuse the read after this many bytes without buffering the rest of the file. */ maxBytes?: number; /** Refuse a symbolic link at the final path component when opening the file. */ noFollow?: boolean; } export interface FileSystemDirectoryPageOptions { /** Return names strictly after this UTF-8 byte-ordered cursor. */ after?: string; /** Maximum number of names to return. */ limit: number; } export interface FileSystemDirectoryPage { /** Names ordered lexicographically by their UTF-8 bytes. */ entries: readonly string[]; hasMore: boolean; } export interface FileSystemContext { cwd: string; home?: string; chmod(path: string, mode: number): Promise; exists(path: string): Promise; lstat(path: string): Promise; /** Inspect a bounded set of paths. Implementations may batch remote work. */ lstatMany(paths: readonly string[]): Promise; mkdir(path: string, options?: { recursive?: boolean; }): Promise; move(source: string, destination: string): Promise; realpath(path: string): Promise; readFile(path: string): Promise; readFileBuffer(path: string, options?: FileSystemReadOptions): Promise; readdir(path: string): Promise; readdirPage(path: string, options: FileSystemDirectoryPageOptions): Promise; rm(path: string, options?: { recursive?: boolean; force?: boolean; }): Promise; setModificationTime(path: string, mtimeMs: number): Promise; stat(path: string): Promise; writeFile(path: string, content: string | Uint8Array): Promise; }