Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FakeFS<P>

Type parameters

Hierarchy

Constructors

Protected constructor

Properties

pathUtils

pathUtils: PathUtils<P>

Static DEFAULT_TIME

DEFAULT_TIME: number = 315532800

Methods

Abstract accessPromise

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

Abstract accessSync

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

Abstract appendFilePromise

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

Abstract appendFileSync

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

changeFilePromise

  • changeFilePromise(p: P, content: string, __namedParameters?: object): Promise<void>

changeFileSync

  • changeFileSync(p: P, content: string, __namedParameters?: object): void

Abstract chmodPromise

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

Abstract chmodSync

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

Abstract closePromise

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

Abstract closeSync

  • closeSync(fd: number): void

Abstract copyFilePromise

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

Abstract copyFileSync

  • copyFileSync(sourceP: P, destP: P, flags?: undefined | 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

Abstract createReadStream

Abstract createWriteStream

Abstract existsPromise

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

Abstract existsSync

  • existsSync(p: P): boolean

genTraversePromise

  • genTraversePromise(init: P, __namedParameters?: object): AsyncGenerator<P extends undefined | null ? never : P, void, unknown>

Abstract getExtractHint

Abstract getRealPath

  • getRealPath(): P

lockPromise

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

Abstract lstatPromise

  • lstatPromise(p: P): Promise<Stats>

Abstract lstatSync

  • lstatSync(p: P): Stats

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

Abstract mkdirPromise

Abstract mkdirSync

mkdirpPromise

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

    • p: P
    • Default value __namedParameters: object = {}
      • chmod: undefined | number
      • utimes: undefined | [string | number | Date, string | number | Date]

    Returns Promise<void>

mkdirpSync

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

movePromise

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

moveSync

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

Abstract openPromise

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

Abstract openSync

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

preserveTimePromise

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

preserveTimeSync

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

Abstract readFilePromise

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

Abstract 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

Abstract readPromise

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

Abstract readSync

  • readSync(fd: number, buffer: Buffer, offset?: undefined | number, length?: undefined | number, position?: number | null): number

Abstract readdirPromise

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

Abstract readdirSync

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

Abstract readlinkPromise

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

Abstract readlinkSync

  • readlinkSync(p: P): P

Abstract realpathPromise

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

Abstract realpathSync

  • realpathSync(p: P): P

removePromise

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

removeSync

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

Abstract renamePromise

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

Abstract renameSync

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

Abstract resolve

  • resolve(p: P): P

Abstract rmdirPromise

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

Abstract rmdirSync

  • rmdirSync(p: P): void

Abstract statPromise

  • statPromise(p: P): Promise<Stats>

Abstract statSync

  • statSync(p: P): Stats

Abstract symlinkPromise

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

Abstract symlinkSync

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

Abstract unlinkPromise

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

Abstract unlinkSync

  • unlinkSync(p: P): void

Abstract utimesPromise

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

Abstract utimesSync

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

Abstract watch

Abstract writeFilePromise

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

Abstract 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

Abstract 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>

Abstract 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