import fs, { BigIntStats, Stats } from 'fs'; import { CreateReadStreamOptions, CreateWriteStreamOptions, Dir, StatWatcher, WatchFileCallback, WatchFileOptions, OpendirOptions, DirentNoPath } from './FakeFS'; import { Dirent, SymlinkType, StatSyncOptions, StatOptions } from './FakeFS'; import { BasePortableFakeFS, WriteFileOptions } from './FakeFS'; import { MkdirOptions, RmdirOptions, RmOptions, WatchOptions, WatchCallback, Watcher } from './FakeFS'; import { FSPath, PortablePath, Filename } from './path'; export declare class NodeFS extends BasePortableFakeFS { private readonly realFs; constructor(realFs?: typeof fs); getExtractHint(): boolean; getRealPath(): PortablePath; resolve(p: PortablePath): PortablePath; openPromise(p: PortablePath, flags: string, mode?: number): Promise; openSync(p: PortablePath, flags: string, mode?: number): number; opendirPromise(p: PortablePath, opts?: OpendirOptions): Promise>; opendirSync(p: PortablePath, opts?: OpendirOptions): Dir; readPromise(fd: number, buffer: Buffer, offset?: number, length?: number, position?: number | null): Promise; readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; writePromise(fd: number, buffer: Buffer, offset?: number, length?: number, position?: number): Promise; writePromise(fd: number, buffer: string, position?: number): Promise; writeSync(fd: number, buffer: Buffer, offset?: number, length?: number, position?: number): number; writeSync(fd: number, buffer: string, position?: number): number; closePromise(fd: number): Promise; closeSync(fd: number): void; createReadStream(p: PortablePath | null, opts?: CreateReadStreamOptions): fs.ReadStream; createWriteStream(p: PortablePath | null, opts?: CreateWriteStreamOptions): fs.WriteStream; realpathPromise(p: PortablePath): Promise; realpathSync(p: PortablePath): PortablePath; existsPromise(p: PortablePath): Promise; accessSync(p: PortablePath, mode?: number): void; accessPromise(p: PortablePath, mode?: number): Promise; existsSync(p: PortablePath): boolean; statPromise(p: PortablePath): Promise; statPromise(p: PortablePath, opts: (StatOptions & { bigint?: false | undefined; }) | undefined): Promise; statPromise(p: PortablePath, opts: StatOptions & { bigint: true; }): Promise; statSync(p: PortablePath): Stats; statSync(p: PortablePath, opts?: StatSyncOptions & { bigint?: false | undefined; throwIfNoEntry: false; }): Stats | undefined; statSync(p: PortablePath, opts: StatSyncOptions & { bigint: true; throwIfNoEntry: false; }): BigIntStats | undefined; statSync(p: PortablePath, opts?: StatSyncOptions & { bigint?: false | undefined; }): Stats; statSync(p: PortablePath, opts: StatSyncOptions & { bigint: true; }): BigIntStats; statSync(p: PortablePath, opts: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false | undefined; }): Stats | BigIntStats; fstatPromise(fd: number): Promise; fstatPromise(fd: number, opts: { bigint: true; }): Promise; fstatPromise(fd: number, opts?: { bigint: boolean; }): Promise; fstatSync(fd: number): Stats; fstatSync(fd: number, opts: { bigint: true; }): BigIntStats; fstatSync(fd: number, opts?: { bigint: boolean; }): BigIntStats | Stats; lstatPromise(p: PortablePath): Promise; lstatPromise(p: PortablePath, opts: (StatOptions & { bigint?: false | undefined; }) | undefined): Promise; lstatPromise(p: PortablePath, opts: StatOptions & { bigint: true; }): Promise; lstatSync(p: PortablePath): Stats; lstatSync(p: PortablePath, opts?: StatSyncOptions & { bigint?: false | undefined; throwIfNoEntry: false; }): Stats | undefined; lstatSync(p: PortablePath, opts: StatSyncOptions & { bigint: true; throwIfNoEntry: false; }): BigIntStats | undefined; lstatSync(p: PortablePath, opts?: StatSyncOptions & { bigint?: false | undefined; }): Stats; lstatSync(p: PortablePath, opts: StatSyncOptions & { bigint: true; }): BigIntStats; lstatSync(p: PortablePath, opts: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false | undefined; }): Stats | BigIntStats; fchmodPromise(fd: number, mask: number): Promise; fchmodSync(fd: number, mask: number): void; chmodPromise(p: PortablePath, mask: number): Promise; chmodSync(p: PortablePath, mask: number): void; fchownPromise(fd: number, uid: number, gid: number): Promise; fchownSync(fd: number, uid: number, gid: number): void; chownPromise(p: PortablePath, uid: number, gid: number): Promise; chownSync(p: PortablePath, uid: number, gid: number): void; renamePromise(oldP: PortablePath, newP: PortablePath): Promise; renameSync(oldP: PortablePath, newP: PortablePath): void; copyFilePromise(sourceP: PortablePath, destP: PortablePath, flags?: number): Promise; copyFileSync(sourceP: PortablePath, destP: PortablePath, flags?: number): void; appendFilePromise(p: FSPath, content: string | Uint8Array, opts?: WriteFileOptions): Promise; appendFileSync(p: PortablePath, content: string | Uint8Array, opts?: WriteFileOptions): void; writeFilePromise(p: FSPath, content: string | NodeJS.ArrayBufferView, opts?: WriteFileOptions): Promise; writeFileSync(p: PortablePath, content: string | NodeJS.ArrayBufferView, opts?: WriteFileOptions): void; unlinkPromise(p: PortablePath): Promise; unlinkSync(p: PortablePath): void; utimesPromise(p: PortablePath, atime: Date | string | number, mtime: Date | string | number): Promise; utimesSync(p: PortablePath, atime: Date | string | number, mtime: Date | string | number): void; lutimesPromise(p: PortablePath, atime: Date | string | number, mtime: Date | string | number): Promise; lutimesSync(p: PortablePath, atime: Date | string | number, mtime: Date | string | number): void; mkdirPromise(p: PortablePath, opts?: MkdirOptions): Promise; mkdirSync(p: PortablePath, opts?: MkdirOptions): string | undefined; rmdirPromise(p: PortablePath, opts?: RmdirOptions): Promise; rmdirSync(p: PortablePath, opts?: RmdirOptions): void; rmPromise(p: PortablePath, opts?: RmOptions): Promise; rmSync(p: PortablePath, opts?: RmOptions): void; linkPromise(existingP: PortablePath, newP: PortablePath): Promise; linkSync(existingP: PortablePath, newP: PortablePath): void; symlinkPromise(target: PortablePath, p: PortablePath, type?: SymlinkType): Promise; symlinkSync(target: PortablePath, p: PortablePath, type?: SymlinkType): void; readFilePromise(p: FSPath, encoding?: null): Promise; readFilePromise(p: FSPath, encoding: BufferEncoding): Promise; readFilePromise(p: FSPath, encoding?: BufferEncoding | null): Promise; readFileSync(p: FSPath, encoding?: null): NonSharedBuffer; readFileSync(p: FSPath, encoding: BufferEncoding): string; readFileSync(p: FSPath, encoding?: BufferEncoding | null): NonSharedBuffer | string; readdirPromise(p: PortablePath, opts?: null): Promise>; readdirPromise(p: PortablePath, opts: { recursive?: false; withFileTypes: true; }): Promise>; readdirPromise(p: PortablePath, opts: { recursive?: false; withFileTypes?: false; }): Promise>; readdirPromise(p: PortablePath, opts: { recursive?: false; withFileTypes: boolean; }): Promise>; readdirPromise(p: PortablePath, opts: { recursive: true; withFileTypes: true; }): Promise>>; readdirPromise(p: PortablePath, opts: { recursive: true; withFileTypes?: false; }): Promise>; readdirPromise(p: PortablePath, opts: { recursive: true; withFileTypes: boolean; }): Promise | PortablePath>>; readdirPromise(p: PortablePath, opts: { recursive: boolean; withFileTypes: true; }): Promise | DirentNoPath>>; readdirPromise(p: PortablePath, opts: { recursive: boolean; withFileTypes?: false; }): Promise>; readdirPromise(p: PortablePath, opts: { recursive: boolean; withFileTypes: boolean; }): Promise | DirentNoPath | PortablePath>>; readdirSync(p: PortablePath, opts?: null): Array; readdirSync(p: PortablePath, opts: { recursive?: false; withFileTypes: true; }): Array; readdirSync(p: PortablePath, opts: { recursive?: false; withFileTypes?: false; }): Array; readdirSync(p: PortablePath, opts: { recursive?: false; withFileTypes: boolean; }): Array; readdirSync(p: PortablePath, opts: { recursive: true; withFileTypes: true; }): Array>; readdirSync(p: PortablePath, opts: { recursive: true; withFileTypes?: false; }): Array; readdirSync(p: PortablePath, opts: { recursive: true; withFileTypes: boolean; }): Array | PortablePath>; readdirSync(p: PortablePath, opts: { recursive: boolean; withFileTypes: true; }): Array | DirentNoPath>; readdirSync(p: PortablePath, opts: { recursive: boolean; withFileTypes?: false; }): Array; readdirSync(p: PortablePath, opts: { recursive: boolean; withFileTypes: boolean; }): Array | DirentNoPath | PortablePath>; readlinkPromise(p: PortablePath): Promise; readlinkSync(p: PortablePath): PortablePath; truncatePromise(p: PortablePath, len?: number): Promise; truncateSync(p: PortablePath, len?: number): void; ftruncatePromise(fd: number, len?: number): Promise; ftruncateSync(fd: number, len?: number): void; watch(p: PortablePath, cb?: WatchCallback): Watcher; watch(p: PortablePath, opts: WatchOptions, cb?: WatchCallback): Watcher; watchFile(p: PortablePath, cb: WatchFileCallback): StatWatcher; watchFile(p: PortablePath, opts: WatchFileOptions, cb: WatchFileCallback): StatWatcher; unwatchFile(p: PortablePath, cb?: WatchFileCallback): void; private makeCallback; }