/** * MockPAL — In-memory implementation of PlatformAbstractionLayer for testing. * @module */ import type { FileStats, ListFilesOptions, Platform, PlatformAbstractionLayer } from "./pal.interface.js"; export interface MockPALOptions { platform?: Platform; cwd?: string; homeDir?: string; env?: Record; } /** * In-memory PAL for use in tests. * * @example * ```typescript * const pal = new MockPAL(); * pal.setFile('/project/README.md', '# Hello'); * const content = await pal.readFile('/project/README.md'); * ``` */ export declare class MockPAL implements PlatformAbstractionLayer { private files; private directories; private errorOnPath; private readonly _platform; private readonly _cwd; private readonly _homeDir; private readonly _env; constructor(options?: MockPALOptions); setFile(path: string, content: string): void; setFiles(fileMap: Record): void; setErrorOnPath(path: string, error: Error): void; reset(): void; getAllFiles(): Map; readFile(path: string): Promise; readFileSync(path: string): string; writeFile(path: string, content: string): Promise; writeFileSync(path: string, content: string): void; exists(path: string): Promise; existsSync(path: string): boolean; deleteFile(path: string, options?: { force?: boolean; }): Promise; copyFile(src: string, dest: string, options?: { overwrite?: boolean; }): Promise; stat(path: string): Promise; listFiles(dir: string, options?: ListFilesOptions): Promise; createDir(path: string): Promise; removeDir(path: string, options?: { recursive?: boolean; force?: boolean; }): Promise; resolvePath(...segments: string[]): string; joinPath(...segments: string[]): string; dirname(path: string): string; basename(path: string, ext?: string): string; extname(path: string): string; isAbsolute(path: string): boolean; relativePath(from: string, to: string): string; getCwd(): string; getHomeDir(): string; getEnv(name: string): string | undefined; getPlatform(): Platform; private normalize; private checkError; private ensureParentDirs; } //# sourceMappingURL=mock-pal.d.ts.map