/** The file methods of a directory on disk. */ export interface DirectoryFiles { readFile(file: string): Promise; writeFile(file: string, content: string): Promise; listFiles(directory?: string): Promise; removeFile(file: string): Promise; glob(pattern: string, options?: { cwd?: string; limit?: number; }): Promise; grep(pattern: string, options?: { cwd?: string; glob?: string; ignoreCase?: boolean; limit?: number; }): Promise>; readBytes(file: string): Promise; writeBytes(file: string, bytes: Uint8Array): Promise; } /** The files under `root`, refusing a path outside it with the error `refuse` makes. */ export declare function directoryFiles(rootDirectory: string, refuse: (path: string) => Error): DirectoryFiles & { ready: Promise; }; /** What a directory's file methods hold once Node's modules have loaded. */ export interface DirectoryHandle { fs: typeof import('node:fs/promises'); dirname: typeof import('node:path').dirname; join: typeof import('node:path').join; relative: typeof import('node:path').relative; root: string; inside: (file: string) => string; }