Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FakeFS<P>

Type parameters

Hierarchy

Constructors

Protected constructor

Properties

pathUtils

pathUtils: PathUtils<P>

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): Promise<void>

Abstract appendFileSync

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

Private changeFileBufferPromise

  • changeFileBufferPromise(p: P, content: Buffer, __namedParameters?: object): Promise<void>

Private changeFileBufferSync

  • changeFileBufferSync(p: P, content: Buffer, __namedParameters?: object): 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

Private changeFileTextPromise

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

Private changeFileTextSync

  • changeFileTextSync(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 chownPromise

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

Abstract chownSync

  • chownSync(p: P, uid: number, gid: 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

Abstract fchmodPromise

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

Abstract fchmodSync

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

Abstract fchownPromise

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

Abstract fchownSync

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

Abstract fstatPromise

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

Abstract fstatSync

Abstract ftruncatePromise

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

Abstract ftruncateSync

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

genTraversePromise

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

Abstract getExtractHint

Abstract getRealPath

  • getRealPath(): P

Abstract linkPromise

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

Abstract linkSync

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

lockPromise

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

Abstract lstatPromise

Abstract 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

Abstract mkdirPromise

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

Abstract mkdirSync

mkdirpPromise

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

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

    Returns Promise<string | undefined>

mkdirpSync

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

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

    Returns string | undefined

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

Abstract opendirPromise

Abstract opendirSync

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 | null): 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 | null): 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

Abstract rmdirSync

Abstract statPromise

Abstract statSync

Abstract symlinkPromise

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

Abstract symlinkSync

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

Abstract truncatePromise

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

Abstract truncateSync

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

Abstract unlinkPromise

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

Abstract unlinkSync

  • unlinkSync(p: P): void

Abstract unwatchFile

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 watchFile

Abstract writeFilePromise

  • writeFilePromise(p: FSPath<P>, content: string | Buffer | ArrayBuffer | DataView, opts?: WriteFileOptions): Promise<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