Skip to main content

MountableFS

Hierarchy

Index

Properties

publicreadonlypathUtils

Methods

abstractaccessPromise

  • accessPromise(p: PortablePath, mode?: number): Promise<void>
  • Parameters

    Returns Promise<void>

abstractaccessSync

  • Parameters

    Returns void

abstractappendFilePromise

abstractappendFileSync

changeFilePromise

  • changeFilePromise(p: PortablePath, content: Buffer): Promise<void>
  • changeFilePromise(p: PortablePath, content: string, opts?: Partial<{ automaticNewlines: boolean; mode: number }>): Promise<void>
  • Parameters

    Returns Promise<void>

changeFileSync

  • changeFileSync(p: PortablePath, content: Buffer): void
  • changeFileSync(p: PortablePath, content: string, opts?: Partial<{ automaticNewlines: boolean; mode: number }>): void
  • Parameters

    Returns void

checksumFilePromise

  • checksumFilePromise(path: PortablePath, __namedParameters?: { algorithm?: string }): Promise<string>
  • Parameters

    • path: PortablePath
    • __namedParameters: { algorithm?: string } = {}

    Returns Promise<string>

abstractchmodPromise

  • Parameters

    Returns Promise<void>

abstractchmodSync

  • Parameters

    Returns void

abstractchownPromise

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

    Returns Promise<void>

abstractchownSync

  • Parameters

    Returns void

abstractclosePromise

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

    • fd: number

    Returns Promise<void>

abstractcloseSync

  • closeSync(fd: number): void
  • Parameters

    • fd: number

    Returns void

abstractcopyFilePromise

  • Parameters

    Returns Promise<void>

abstractcopyFileSync

copyPromise

  • Parameters

    Returns Promise<void>

copySync

  • copySync(destination: PortablePath, source: PortablePath, options?: { baseFs?: undefined; overwrite?: boolean }): void
  • copySync<P2>(destination: PortablePath, source: P2, options: { baseFs: FakeFS<P2>; overwrite?: boolean }): void
  • @deprecated

    Prefer using copyPromise instead


    Parameters

    Returns void

abstractcreateReadStream

  • createReadStream(p: null | PortablePath, opts?: Partial<{ encoding: BufferEncoding; fd: number }>): ReadStream
  • Parameters

    • p: null | PortablePath
    • optionalopts: Partial<{ encoding: BufferEncoding; fd: number }>

    Returns ReadStream

abstractcreateWriteStream

  • createWriteStream(p: null | PortablePath, opts?: Partial<{ encoding: BufferEncoding; fd: number; flags: a }>): WriteStream
  • Parameters

    • p: null | PortablePath
    • optionalopts: Partial<{ encoding: BufferEncoding; fd: number; flags: a }>

    Returns WriteStream

optionaldiscardAndClose

  • discardAndClose(): void
  • Returns void

abstractexistsPromise

  • Parameters

    Returns Promise<boolean>

abstractexistsSync

  • Parameters

    Returns boolean

abstractfchmodPromise

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

    • fd: number
    • mask: number

    Returns Promise<void>

abstractfchmodSync

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

    • fd: number
    • mask: number

    Returns void

abstractfchownPromise

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

    • fd: number
    • uid: number
    • gid: number

    Returns Promise<void>

abstractfchownSync

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

    • fd: number
    • uid: number
    • gid: number

    Returns void

abstractfstatPromise

  • fstatPromise(fd: number): Promise<Stats>
  • fstatPromise(fd: number, opts: { bigint: true }): Promise<BigIntStats>
  • fstatPromise(fd: number, opts?: { bigint?: boolean }): Promise<Stats | BigIntStats>
  • Parameters

    • fd: number

    Returns Promise<Stats>

abstractfstatSync

  • Parameters

    • fd: number

    Returns Stats

abstractftruncatePromise

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

    • fd: number
    • optionallen: number

    Returns Promise<void>

abstractftruncateSync

  • ftruncateSync(fd: number, len?: number): void
  • Parameters

    • fd: number
    • optionallen: number

    Returns void

genTraversePromise

  • genTraversePromise(init: PortablePath, __namedParameters?: { stableSort?: boolean }): AsyncGenerator<PortablePath, void, unknown>
  • Parameters

    • init: PortablePath
    • __namedParameters: { stableSort?: boolean } = {}

    Returns AsyncGenerator<PortablePath, void, unknown>

abstractgetExtractHint

  • @deprecated: Moved to jsInstallUtils


    Parameters

    Returns boolean

abstractgetRealPath

optionalhasOpenFileHandles

  • hasOpenFileHandles(): boolean
  • Returns boolean

abstractlinkPromise

abstractlinkSync

lockPromise

  • lockPromise<T>(affectedPath: PortablePath, callback: () => Promise<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    Returns Promise<T>

abstractlstatPromise

abstractlstatSync

abstractlutimesPromise

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

    • p: PortablePath
    • atime: string | number | Date
    • mtime: string | number | Date

    Returns Promise<void>

abstractlutimesSync

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

    • p: PortablePath
    • atime: string | number | Date
    • mtime: string | number | Date

    Returns void

abstractmkdirPromise

  • mkdirPromise(p: PortablePath, opts?: Partial<{ mode: number; recursive: boolean }>): Promise<undefined | string>
  • Parameters

    • p: PortablePath
    • optionalopts: Partial<{ mode: number; recursive: boolean }>

    Returns Promise<undefined | string>

abstractmkdirSync

  • mkdirSync(p: PortablePath, opts?: Partial<{ mode: number; recursive: boolean }>): undefined | string
  • Parameters

    • p: PortablePath
    • optionalopts: Partial<{ mode: number; recursive: boolean }>

    Returns undefined | string

mkdirpPromise

  • mkdirpPromise(p: PortablePath, __namedParameters?: { chmod?: number; utimes?: [string | number | Date, string | number | Date] }): Promise<undefined | string>
  • Parameters

    • p: PortablePath
    • __namedParameters: { chmod?: number; utimes?: [string | number | Date, string | number | Date] } = {}

    Returns Promise<undefined | string>

mkdirpSync

  • mkdirpSync(p: PortablePath, __namedParameters?: { chmod?: number; utimes?: [string | number | Date, string | number | Date] }): undefined | string
  • Parameters

    • p: PortablePath
    • __namedParameters: { chmod?: number; utimes?: [string | number | Date, string | number | Date] } = {}

    Returns undefined | string

movePromise

moveSync

abstractopenPromise

  • openPromise(p: PortablePath, flags: string, mode?: number): Promise<number>
  • Parameters

    Returns Promise<number>

abstractopenSync

  • openSync(p: PortablePath, flags: string, mode?: number): number
  • Parameters

    Returns number

abstractopendirPromise

  • Parameters

    • p: PortablePath
    • optionalopts: Partial<{ bufferSize: number; recursive: boolean }>

    Returns Promise<Dir<PortablePath>>

abstractopendirSync

  • Parameters

    • p: PortablePath
    • optionalopts: Partial<{ bufferSize: number; recursive: boolean }>

    Returns Dir<PortablePath>

preserveTimePromise

  • Parameters

    Returns Promise<void>

preserveTimeSync

abstractreadFilePromise

  • Parameters

    Returns Promise<Buffer>

abstractreadFileSync

  • Parameters

    Returns Buffer

readJsonPromise

  • Parameters

    Returns Promise<any>

readJsonSync

  • Parameters

    Returns any

abstractreadPromise

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

    • fd: number
    • buffer: Buffer
    • optionaloffset: number
    • optionallength: number
    • optionalposition: null | number

    Returns Promise<number>

abstractreadSync

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

    • fd: number
    • buffer: Buffer
    • optionaloffset: number
    • optionallength: number
    • optionalposition: null | number

    Returns number

abstractreaddirPromise

  • Parameters

    Returns Promise<Filename[]>

abstractreaddirSync

abstractreadlinkPromise

abstractreadlinkSync

abstractrealpathPromise

abstractrealpathSync

removePromise

  • removePromise(p: PortablePath, __namedParameters?: { maxRetries?: number; recursive?: boolean }): Promise<void>
  • Parameters

    • p: PortablePath
    • __namedParameters: { maxRetries?: number; recursive?: boolean } = {}

    Returns Promise<void>

removeSync

  • removeSync(p: PortablePath, __namedParameters?: { recursive?: boolean }): void
  • Parameters

    • p: PortablePath
    • __namedParameters: { recursive?: boolean } = {}

    Returns void

abstractrenamePromise

abstractrenameSync

abstractresolve

abstractrmdirPromise

  • rmdirPromise(p: PortablePath, opts?: Partial<{ maxRetries: number; recursive: boolean; retryDelay: number }>): Promise<void>
  • Parameters

    • p: PortablePath
    • optionalopts: Partial<{ maxRetries: number; recursive: boolean; retryDelay: number }>

    Returns Promise<void>

abstractrmdirSync

  • rmdirSync(p: PortablePath, opts?: Partial<{ maxRetries: number; recursive: boolean; retryDelay: number }>): void
  • Parameters

    • p: PortablePath
    • optionalopts: Partial<{ maxRetries: number; recursive: boolean; retryDelay: number }>

    Returns void

optionalsaveAndClose

  • saveAndClose(): void
  • Returns void

abstractstatPromise

abstractstatSync

abstractsymlinkPromise

abstractsymlinkSync

abstracttruncatePromise

  • truncatePromise(p: PortablePath, len?: number): Promise<void>
  • Parameters

    Returns Promise<void>

abstracttruncateSync

  • Parameters

    Returns void

abstractunlinkPromise

  • Parameters

    Returns Promise<void>

abstractunlinkSync

  • Parameters

    Returns void

abstractunwatchFile

abstractutimesPromise

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

    • p: PortablePath
    • atime: string | number | Date
    • mtime: string | number | Date

    Returns Promise<void>

abstractutimesSync

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

    • p: PortablePath
    • atime: string | number | Date
    • mtime: string | number | Date

    Returns void

abstractwatch

abstractwatchFile

abstractwriteFilePromise

abstractwriteFileSync

writeJsonPromise

  • writeJsonPromise(p: PortablePath, data: any, __namedParameters?: { compact?: boolean }): Promise<void>
  • Parameters

    • p: PortablePath
    • data: any
    • __namedParameters: { compact?: boolean } = {}

    Returns Promise<void>

writeJsonSync

  • writeJsonSync(p: PortablePath, data: any, __namedParameters?: { compact?: boolean }): void
  • Parameters

    • p: PortablePath
    • data: any
    • __namedParameters: { compact?: boolean } = {}

    Returns void

abstractwritePromise

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

    • fd: number
    • buffer: Buffer
    • optionaloffset: number
    • optionallength: number
    • optionalposition: number

    Returns Promise<number>

abstractwriteSync

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

    • fd: number
    • buffer: Buffer
    • optionaloffset: number
    • optionallength: number
    • optionalposition: number

    Returns number