/**
 * Node.js fs module shim
 * Wraps VirtualFS to provide Node.js compatible API
 */
import { VirtualFS } from '../virtual-fs';
import type { Stats, FSWatcher, WatchListener, WatchEventType } from '../virtual-fs';
export type { Stats, FSWatcher, WatchListener, WatchEventType };
export interface FsShim {
    readFileSync(path: string): Buffer;
    readFileSync(path: string, encoding: 'utf8' | 'utf-8'): string;
    readFileSync(path: string, options: {
        encoding: 'utf8' | 'utf-8';
    }): string;
    readFileSync(path: string, options: {
        encoding?: null;
    }): Buffer;
    writeFileSync(path: string, data: string | Uint8Array): void;
    existsSync(path: string): boolean;
    mkdirSync(path: string, options?: {
        recursive?: boolean;
    }): void;
    readdirSync(path: string): string[];
    readdirSync(path: string, options: {
        withFileTypes: true;
    }): Dirent[];
    readdirSync(path: string, options?: {
        withFileTypes?: boolean;
        encoding?: string;
    } | string): string[] | Dirent[];
    statSync(path: string): Stats;
    lstatSync(path: string): Stats;
    fstatSync(fd: number): Stats;
    unlinkSync(path: string): void;
    rmdirSync(path: string): void;
    renameSync(oldPath: string, newPath: string): void;
    realpathSync(path: string): string;
    accessSync(path: string, mode?: number): void;
    copyFileSync(src: string, dest: string): void;
    openSync(path: string, flags: string | number, mode?: number): number;
    closeSync(fd: number): void;
    readSync(fd: number, buffer: Buffer | Uint8Array, offset: number, length: number, position: number | null): number;
    writeSync(fd: number, buffer: Buffer | Uint8Array | string, offset?: number, length?: number, position?: number | null): number;
    ftruncateSync(fd: number, len?: number): void;
    fsyncSync(fd: number): void;
    fdatasyncSync(fd: number): void;
    mkdtempSync(prefix: string): string;
    rmSync(path: string, options?: {
        recursive?: boolean;
        force?: boolean;
    }): void;
    watch(filename: string, options?: {
        persistent?: boolean;
        recursive?: boolean;
    }, listener?: WatchListener): FSWatcher;
    watch(filename: string, listener?: WatchListener): FSWatcher;
    readFile(path: string, callback: (err: Error | null, data?: Uint8Array) => void): void;
    readFile(path: string, options: {
        encoding: string;
    }, callback: (err: Error | null, data?: string) => void): void;
    stat(path: string, callback: (err: Error | null, stats?: Stats) => void): void;
    lstat(path: string, callback: (err: Error | null, stats?: Stats) => void): void;
    readdir(path: string, callback: (err: Error | null, files?: string[]) => void): void;
    realpath(path: string, callback: (err: Error | null, resolvedPath?: string) => void): void;
    access(path: string, callback: (err: Error | null) => void): void;
    access(path: string, mode: number, callback: (err: Error | null) => void): void;
    createReadStream(path: string): unknown;
    createWriteStream(path: string): unknown;
    promises: FsPromises;
    constants: FsConstants;
}
export interface FsPromises {
    readFile(path: string): Promise<Buffer>;
    readFile(path: string, encoding: 'utf8' | 'utf-8'): Promise<string>;
    readFile(path: string, options: {
        encoding: 'utf8' | 'utf-8';
    }): Promise<string>;
    writeFile(path: string, data: string | Uint8Array): Promise<void>;
    stat(path: string): Promise<Stats>;
    lstat(path: string): Promise<Stats>;
    readdir(path: string): Promise<string[]>;
    mkdir(path: string, options?: {
        recursive?: boolean;
    }): Promise<void>;
    unlink(path: string): Promise<void>;
    rmdir(path: string): Promise<void>;
    rename(oldPath: string, newPath: string): Promise<void>;
    access(path: string, mode?: number): Promise<void>;
    realpath(path: string): Promise<string>;
    copyFile(src: string, dest: string): Promise<void>;
}
export interface FsConstants {
    F_OK: number;
    R_OK: number;
    W_OK: number;
    X_OK: number;
}
/**
 * Dirent class - represents a directory entry returned by readdirSync with withFileTypes: true
 */
export declare class Dirent {
    name: string;
    private _isDirectory;
    private _isFile;
    constructor(name: string, isDirectory: boolean, isFile: boolean);
    isDirectory(): boolean;
    isFile(): boolean;
    isBlockDevice(): boolean;
    isCharacterDevice(): boolean;
    isFIFO(): boolean;
    isSocket(): boolean;
    isSymbolicLink(): boolean;
}
export declare function createFsShim(vfs: VirtualFS, getCwd?: () => string): FsShim;
export default createFsShim;
//# sourceMappingURL=fs.d.ts.map