//#region src/fs/interface.d.ts type FileSystemEntryType = "file" | "directory" | "symlink"; type BufferEncoding = | "utf8" | "utf-8" | "ascii" | "binary" | "base64" | "hex" | "latin1"; type FileContent = string | Uint8Array; /** Stat result returned by FileSystem.stat / FileSystem.lstat. */ interface FsStat { type: FileSystemEntryType; size: number; mtime: Date; mode?: number; } /** Directory entry returned by FileSystem.readdirWithFileTypes. */ interface FileSystemDirent { name: string; type: FileSystemEntryType; } interface MkdirOptions { recursive?: boolean; } interface RmOptions { recursive?: boolean; force?: boolean; } interface CpOptions { recursive?: boolean; } /** * Minimal filesystem abstraction. Both `InMemoryFs` and the * `WorkspaceFileSystem` adapter implement this interface so that * `FileSystemStateBackend` can wrap either one. * * Contracts: * - `readFile` / `readFileBytes` / `stat` / `lstat` throw `ENOENT` * when the path does not exist (never return null). * - `exists` never throws. * - `glob` returns absolute paths matching the pattern, sorted. */ interface FileSystem { readFile(path: string): Promise; readFileBytes(path: string): Promise; writeFile(path: string, content: string): Promise; writeFileBytes(path: string, content: Uint8Array): Promise; appendFile(path: string, content: string | Uint8Array): Promise; exists(path: string): Promise; /** Follows symlinks. Throws ENOENT if path does not exist. */ stat(path: string): Promise; /** Does not follow the final symlink. Throws ENOENT if path does not exist. */ lstat(path: string): Promise; mkdir(path: string, options?: MkdirOptions): Promise; readdir(path: string): Promise; readdirWithFileTypes(path: string): Promise; rm(path: string, options?: RmOptions): Promise; cp(src: string, dest: string, options?: CpOptions): Promise; mv(src: string, dest: string): Promise; symlink(target: string, linkPath: string): Promise; readlink(path: string): Promise; realpath(path: string): Promise; resolvePath(base: string, path: string): string; glob(pattern: string): Promise; } interface ReadFileOptions { encoding?: BufferEncoding | null; } interface WriteFileOptions { encoding?: BufferEncoding; } interface FileInit { content: FileContent; mode?: number; mtime?: Date; } type LazyFileProvider = () => | string | Uint8Array | Promise; type InitialFiles = Record; //#endregion export { FileSystemDirent as a, MkdirOptions as c, WriteFileOptions as d, FileSystem as i, ReadFileOptions as l, CpOptions as n, FsStat as o, FileContent as r, InitialFiles as s, BufferEncoding as t, RmOptions as u }; //# sourceMappingURL=interface-CjgTx0Yc.d.ts.map