Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LazyFS<P>

Type parameters

Hierarchy

Constructors

constructor

Properties

Private factory

factory: LazyFSFactory<P>

Private instance

instance: FakeFS<P> | null = null

pathUtils

pathUtils: PathUtils<P>

Accessors

Protected baseFs

  • get baseFs(): FakeFS<P>
  • set baseFs(value: FakeFS<P>): void

Methods

accessPromise

  • accessPromise(p: P, mode?: undefined | number): Promise<void>

accessSync

  • accessSync(p: P, mode?: undefined | number): void

appendFilePromise

  • appendFilePromise(p: FSPath<P>, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): Promise<void>

appendFileSync

  • appendFileSync(p: FSPath<P>, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): void

changeFilePromise

  • changeFilePromise(p: P, content: Buffer): Promise<void>
  • changeFilePromise(p: P, content: string, opts?: ChangeFileOptions): Promise<void>

changeFileSync

  • changeFileSync(p: P, content: Buffer): void
  • changeFileSync(p: P, content: string, opts?: ChangeFileOptions): void

chmodPromise

  • chmodPromise(p: P, mask: number): Promise<void>

chmodSync

  • chmodSync(p: P, mask: number): void

chownPromise

  • chownPromise(p: P, uid: number, gid: number): Promise<void>

chownSync

  • chownSync(p: P, uid: number, gid: number): void

closePromise

  • closePromise(fd: number): Promise<void>

closeSync

  • closeSync(fd: number): void

copyFilePromise

  • copyFilePromise(sourceP: P, destP: P, flags?: number): Promise<void>

copyFileSync

  • copyFileSync(sourceP: P, destP: P, flags?: number): void

copyPromise

  • copyPromise(destination: P, source: P, options?: undefined | object): Promise<void>
  • copyPromise<P2>(destination: P, source: P2, options: object): Promise<void>

copySync

  • copySync(destination: P, source: P, options?: undefined | object): void
  • copySync<P2>(destination: P, source: P2, options: object): void

createReadStream

createWriteStream

existsPromise

  • existsPromise(p: P): Promise<boolean>

existsSync

  • existsSync(p: P): boolean

fchmodPromise

  • fchmodPromise(fd: number, mask: number): Promise<void>

fchmodSync

  • fchmodSync(fd: number, mask: number): void

fchownPromise

  • fchownPromise(fd: number, uid: number, gid: number): Promise<void>

fchownSync

  • fchownSync(fd: number, uid: number, gid: number): void

fstatPromise

  • fstatPromise(fd: number): Promise<Stats>
  • fstatPromise(fd: number, opts: object): Promise<BigIntStats>
  • fstatPromise(fd: number, opts?: undefined | object): Promise<BigIntStats | Stats>

fstatSync

  • fstatSync(fd: number): Stats
  • fstatSync(fd: number, opts: object): BigIntStats
  • fstatSync(fd: number, opts?: undefined | object): BigIntStats | Stats

ftruncatePromise

  • ftruncatePromise(fd: number, len?: undefined | number): Promise<void>

ftruncateSync

  • ftruncateSync(fd: number, len?: undefined | number): void

genTraversePromise

  • genTraversePromise(init: P, __namedParameters?: object): AsyncGenerator<P, void, unknown>

getExtractHint

getRealPath

  • getRealPath(): P

linkPromise

  • linkPromise(existingP: P, newP: P): Promise<void>

linkSync

  • linkSync(existingP: P, newP: P): void

lockPromise

  • lockPromise<T>(affectedPath: P, callback: function): Promise<T>

lstatPromise

  • lstatPromise(p: P): Promise<Stats>
  • lstatPromise(p: P, opts: StatOptions & object | undefined): Promise<Stats>
  • lstatPromise(p: P, opts: StatOptions & object): Promise<BigIntStats>

lstatSync

Optional lutimesPromise

  • lutimesPromise(p: P, atime: Date | string | number, mtime: Date | string | number): Promise<void>

Optional lutimesSync

  • lutimesSync(p: P, atime: Date | string | number, mtime: Date | string | number): void

Protected mapFromBase

  • mapFromBase(p: P): P

Protected mapToBase

  • mapToBase(p: P): P

mkdirPromise

  • mkdirPromise(p: P, opts?: MkdirOptions): Promise<undefined | string>

mkdirSync

mkdirpPromise

  • mkdirpPromise(p: P, __namedParameters?: object): Promise<string | undefined>

mkdirpSync

  • mkdirpSync(p: P, __namedParameters?: object): string | undefined

movePromise

  • movePromise(fromP: P, toP: P): Promise<void>

moveSync

  • moveSync(fromP: P, toP: P): void

openPromise

  • openPromise(p: P, flags: string, mode?: undefined | number): Promise<number>

openSync

  • openSync(p: P, flags: string, mode?: undefined | number): number

opendirPromise

opendirSync

preserveTimePromise

  • preserveTimePromise(p: P, cb: function): Promise<void>

preserveTimeSync

  • preserveTimeSync(p: P, cb: function): Promise<void>

readFilePromise

  • readFilePromise(p: FSPath<P>, encoding: "utf8"): Promise<string>
  • readFilePromise(p: FSPath<P>, encoding?: undefined | string): Promise<Buffer>

readFileSync

  • readFileSync(p: FSPath<P>, encoding: "utf8"): string
  • readFileSync(p: FSPath<P>, encoding?: undefined | string): Buffer

readJsonPromise

  • readJsonPromise(p: P): Promise<any>

readJsonSync

  • readJsonSync(p: P): any

readPromise

  • readPromise(fd: number, buffer: Buffer, offset?: undefined | number, length?: undefined | number, position?: number | null): Promise<number>

readSync

  • readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number

readdirPromise

  • readdirPromise(p: P): Promise<Array<Filename>>
  • readdirPromise(p: P, opts: object | null): Promise<Array<Filename>>
  • readdirPromise(p: P, opts: object): Promise<Array<Dirent>>
  • readdirPromise(p: P, opts: object): Promise<Array<Filename> | Array<Dirent>>

readdirSync

  • readdirSync(p: P): Array<Filename>
  • readdirSync(p: P, opts: object | null): Array<Filename>
  • readdirSync(p: P, opts: object): Array<Dirent>
  • readdirSync(p: P, opts: object): Array<Filename> | Array<Dirent>

readlinkPromise

  • readlinkPromise(p: P): Promise<P>

readlinkSync

  • readlinkSync(p: P): P

realpathPromise

  • realpathPromise(p: P): Promise<P>

realpathSync

  • realpathSync(p: P): P

removePromise

  • removePromise(p: P, __namedParameters?: object): Promise<void>

removeSync

  • removeSync(p: P, __namedParameters?: object): void

renamePromise

  • renamePromise(oldP: P, newP: P): Promise<void>

renameSync

  • renameSync(oldP: P, newP: P): void

resolve

  • resolve(path: P): P

rmdirPromise

rmdirSync

statPromise

  • statPromise(p: P): Promise<Stats>
  • statPromise(p: P, opts: StatOptions & object | undefined): Promise<Stats>
  • statPromise(p: P, opts: StatOptions & object): Promise<BigIntStats>

statSync

symlinkPromise

  • symlinkPromise(target: P, p: P, type?: SymlinkType): Promise<void>

symlinkSync

  • symlinkSync(target: P, p: P, type?: SymlinkType): void

truncatePromise

  • truncatePromise(p: P, len?: undefined | number): Promise<void>

truncateSync

  • truncateSync(p: P, len?: undefined | number): void

unlinkPromise

  • unlinkPromise(p: P): Promise<void>

unlinkSync

  • unlinkSync(p: P): void

unwatchFile

utimesPromise

  • utimesPromise(p: P, atime: Date | string | number, mtime: Date | string | number): Promise<void>

utimesSync

  • utimesSync(p: P, atime: Date | string | number, mtime: Date | string | number): void

watch

watchFile

writeFilePromise

  • writeFilePromise(p: FSPath<P>, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): Promise<void>

writeFileSync

  • writeFileSync(p: FSPath<P>, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): void

writeJsonPromise

  • writeJsonPromise(p: P, data: any): Promise<void>

writeJsonSync

  • writeJsonSync(p: P, data: any): void

writePromise

  • writePromise(fd: number, buffer: Buffer, offset?: undefined | number, length?: undefined | number, position?: undefined | number): Promise<number>
  • writePromise(fd: number, buffer: string, position?: undefined | number): Promise<number>

writeSync

  • writeSync(fd: number, buffer: Buffer, offset?: undefined | number, length?: undefined | number, position?: undefined | number): number
  • writeSync(fd: number, buffer: string, position?: undefined | number): number

Generated using TypeDoc