/// /// /// /// import { Stats, BigIntStats } from 'fs'; import { CreateReadStreamOptions, CreateWriteStreamOptions, FakeFS, ExtractHintOptions, WatchFileCallback, WatchFileOptions, StatWatcher, Dir, OpendirOptions } from './FakeFS'; import { Dirent, SymlinkType, StatSyncOptions, StatOptions } from './FakeFS'; import { MkdirOptions, RmdirOptions, WriteFileOptions, WatchCallback, WatchOptions, Watcher } from './FakeFS'; import { FSPath, Filename, Path } from './path'; export declare abstract class ProxiedFS

extends FakeFS

{ protected abstract readonly baseFs: FakeFS; /** * Convert a path from the user format into what should be fed into the internal FS. */ protected abstract mapToBase(path: P): IP; /** * Convert a path from the format supported by the base FS into the user one. */ protected abstract mapFromBase(path: IP): P; getExtractHint(hints: ExtractHintOptions): boolean; resolve(path: P): P; getRealPath(): P; openPromise(p: P, flags: string, mode?: number): Promise; openSync(p: P, flags: string, mode?: number): number; opendirPromise(p: P, opts?: OpendirOptions): Promise>; opendirSync(p: P, 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: P | null, opts?: CreateReadStreamOptions): import("fs").ReadStream; createWriteStream(p: P | null, opts?: CreateWriteStreamOptions): import("fs").WriteStream; realpathPromise(p: P): Promise

; realpathSync(p: P): P; existsPromise(p: P): Promise; existsSync(p: P): boolean; accessSync(p: P, mode?: number): void; accessPromise(p: P, mode?: number): Promise; statPromise(p: P): Promise; statPromise(p: P, opts: (StatOptions & { bigint?: false | undefined; }) | undefined): Promise; statPromise(p: P, opts: StatOptions & { bigint: true; }): Promise; statSync(p: P): Stats; statSync(p: P, opts?: StatSyncOptions & { bigint?: false | undefined; throwIfNoEntry: false; }): Stats | undefined; statSync(p: P, opts: StatSyncOptions & { bigint: true; throwIfNoEntry: false; }): BigIntStats | undefined; statSync(p: P, opts?: StatSyncOptions & { bigint?: false | undefined; }): Stats; statSync(p: P, opts: StatSyncOptions & { bigint: true; }): BigIntStats; statSync(p: P, 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: P): Promise; lstatPromise(p: P, opts: (StatOptions & { bigint?: false | undefined; }) | undefined): Promise; lstatPromise(p: P, opts: StatOptions & { bigint: true; }): Promise; lstatSync(p: P): Stats; lstatSync(p: P, opts?: StatSyncOptions & { bigint?: false | undefined; throwIfNoEntry: false; }): Stats | undefined; lstatSync(p: P, opts: StatSyncOptions & { bigint: true; throwIfNoEntry: false; }): BigIntStats | undefined; lstatSync(p: P, opts?: StatSyncOptions & { bigint?: false | undefined; }): Stats; lstatSync(p: P, opts: StatSyncOptions & { bigint: true; }): BigIntStats; lstatSync(p: P, opts: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false | undefined; }): Stats | BigIntStats; fchmodPromise(fd: number, mask: number): Promise; fchmodSync(fd: number, mask: number): void; chmodPromise(p: P, mask: number): Promise; chmodSync(p: P, mask: number): void; fchownPromise(fd: number, uid: number, gid: number): Promise; fchownSync(fd: number, uid: number, gid: number): void; chownPromise(p: P, uid: number, gid: number): Promise; chownSync(p: P, uid: number, gid: number): void; renamePromise(oldP: P, newP: P): Promise; renameSync(oldP: P, newP: P): void; copyFilePromise(sourceP: P, destP: P, flags?: number): Promise; copyFileSync(sourceP: P, destP: P, flags?: number): void; appendFilePromise(p: FSPath

, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): Promise; appendFileSync(p: FSPath

, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): void; writeFilePromise(p: FSPath

, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): Promise; writeFileSync(p: FSPath

, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): void; unlinkPromise(p: P): Promise; unlinkSync(p: P): void; utimesPromise(p: P, atime: Date | string | number, mtime: Date | string | number): Promise; utimesSync(p: P, atime: Date | string | number, mtime: Date | string | number): void; mkdirPromise(p: P, opts?: MkdirOptions): Promise; mkdirSync(p: P, opts?: MkdirOptions): string | undefined; rmdirPromise(p: P, opts?: RmdirOptions): Promise; rmdirSync(p: P, opts?: RmdirOptions): void; linkPromise(existingP: P, newP: P): Promise; linkSync(existingP: P, newP: P): void; symlinkPromise(target: P, p: P, type?: SymlinkType): Promise; symlinkSync(target: P, p: P, type?: SymlinkType): void; readFilePromise(p: FSPath

, encoding: 'utf8'): Promise; readFilePromise(p: FSPath

, encoding?: string): Promise; readFileSync(p: FSPath

, encoding: 'utf8'): string; readFileSync(p: FSPath

, encoding?: string): Buffer; readdirPromise(p: P): Promise>; readdirPromise(p: P, opts: { withFileTypes: false; } | null): Promise>; readdirPromise(p: P, opts: { withFileTypes: true; }): Promise>; readdirPromise(p: P, opts: { withFileTypes: boolean; }): Promise | Array>; readdirSync(p: P): Array; readdirSync(p: P, opts: { withFileTypes: false; } | null): Array; readdirSync(p: P, opts: { withFileTypes: true; }): Array; readdirSync(p: P, opts: { withFileTypes: boolean; }): Array | Array; readlinkPromise(p: P): Promise

; readlinkSync(p: P): P; truncatePromise(p: P, len?: number): Promise; truncateSync(p: P, len?: number): void; ftruncatePromise(fd: number, len?: number): Promise; ftruncateSync(fd: number, len?: number): void; watch(p: P, cb?: WatchCallback): Watcher; watch(p: P, opts: WatchOptions, cb?: WatchCallback): Watcher; watchFile(p: P, cb: WatchFileCallback): StatWatcher; watchFile(p: P, opts: WatchFileOptions, cb: WatchFileCallback): StatWatcher; unwatchFile(p: P, cb?: WatchFileCallback): void; private fsMapToBase; }