import { Workspace } from './Workspace.js';
import { SyncWorkspace } from './SyncWorkspace.js';
import { DirectoryEntry } from './DirectoryEntry.js';
export declare class InMemoryFile implements DirectoryEntry {
    readonly name: string;
    private _data;
    readonly type = "file";
    constructor(name: string, _data: string);
    read(): string;
    write(data: string): void;
}
export declare class InMemoryDir implements DirectoryEntry {
    readonly name: string;
    private _entries;
    readonly type = "directory";
    constructor(name: string, _entries?: Map<string, InMemoryFile | InMemoryDir>);
    addEntry(entry: InMemoryFile | InMemoryDir): void;
    removeEntry(name: string): boolean;
    getFile(name: string): InMemoryFile | undefined;
    getDirectory(name: string): InMemoryDir | undefined;
    getEntries(): (InMemoryFile | InMemoryDir)[];
}
export declare class InMemoryWorkspace implements Workspace, SyncWorkspace {
    private root;
    exec(command: string, args?: string[], timeout?: number): Promise<{
        exitCode: number;
        stdout: string;
        stderr: string;
    }>;
    mkdir(subpath: string, opt?: {
        recursive: boolean;
    }): Promise<void>;
    rmdir(subpath: string, opt: {
        recursive: boolean;
    }): Promise<void>;
    readdir(subpath: string): Promise<DirectoryEntry[]>;
    writeFile(filePath: string, data: string): Promise<void>;
    readFile(filePath: string): Promise<string>;
    rm(filePath: string): Promise<void>;
    exists(pathStr: string): Promise<boolean>;
    rename(oldPath: string, newPath: string): Promise<void>;
    appendFile(subpath: string, data: string): Promise<void>;
    writeFileSync(subpath: string, data: string): void;
    readFileSync(subpath: string): string;
    existsSync(subpath: string): boolean;
    renameSync(oldPath: string, newPath: string): void;
    rmSync(filePath: string): void;
    mkdirSync(subpath: string, opts?: {
        recursive: boolean;
    }): void;
    rmdirSync(subpath: string, opts?: {
        recursive: boolean;
    }): void;
    readdirSync(subpath: string): DirectoryEntry[];
    appendFileSync(subpath: string, data: string): void;
    private navigateToPath;
    private toWorkspacePath;
    private toWorkspacePathSegments;
}
