Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AliasFS<P>

Type parameters

Hierarchy

Constructors

constructor

  • new AliasFS(target: P, __namedParameters: object): AliasFS

Properties

Protected baseFs

baseFs: FakeFS<P>

pathUtils

pathUtils: PathUtils<P>

Private target

target: P

Static DEFAULT_TIME

DEFAULT_TIME: number = 315532800

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

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

genTraversePromise

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

getBaseFs

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: object): Promise<BigIntStats>
  • lstatPromise(p: P, opts?: undefined | object): Promise<BigIntStats | Stats>

lstatSync

  • lstatSync(p: P): Stats
  • lstatSync(p: P, opts: object): BigIntStats
  • lstatSync(p: P, opts?: undefined | object): BigIntStats | 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

Protected mapFromBase

  • mapFromBase(p: P): P

Protected mapToBase

  • mapToBase(p: P): P

mkdirPromise

mkdirSync

mkdirpPromise

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

mkdirpSync

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

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): 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): 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: object): Promise<BigIntStats>
  • statPromise(p: P, opts?: undefined | object): Promise<BigIntStats | Stats>

statSync

  • statSync(p: P): Stats
  • statSync(p: P, opts: object): BigIntStats
  • statSync(p: P, opts?: undefined | object): BigIntStats | Stats

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