Files
memecoin-botV2/.pnpm-store/v10/files/49/57a57a1efebe9d1a823bb53857f3e68a27c2aeb21abec0921bc87fd576f9704063eb54e3fc1ea5ebad2c923a4a994ced2c5f2e52812e3c104beccc840a9328

23 lines
1.1 KiB
Plaintext

export interface FileSystemEntries {
files: string[];
directories: string[];
}
export interface FileSystem {
directoryExists?: (directoryName: string) => boolean | undefined;
fileExists?: (fileName: string) => boolean | undefined;
getAccessibleEntries?: (directoryName: string) => FileSystemEntries | undefined;
/**
* Read a file's content.
* - Return the file content as a `string` (including `""` for empty files).
* - Return `null` to indicate the file does not exist (without falling back to the real FS).
* - Return `undefined` to fall back to the real filesystem.
*/
readFile?: (fileName: string) => string | null | undefined;
realpath?: (path: string) => string | undefined;
writeFile?: (path: string, content: string) => void;
removeFile?: (path: string) => void;
}
/** The callback names supported by the Go server for virtual FS delegation. */
export declare const fsCallbackNames: readonly ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"];
export declare function createVirtualFileSystem(files: Record<string, string>): FileSystem;
//# sourceMappingURL=fs.d.ts.map