Skip to main content

JailFS

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns JailFS

Properties

publicreadonlypathUtils

Methods

accessPromise

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

    Returns Promise<void>

accessSync

  • Parameters

    Returns void

appendFilePromise

appendFileSync

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>

chmodPromise

  • Parameters

    Returns Promise<void>

chmodSync

  • Parameters

    Returns void

chownPromise

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

    Returns Promise<void>

chownSync

  • Parameters

    Returns void

closePromise

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

    • fd: number

    Returns Promise<void>

closeSync

  • closeSync(fd: number): void
  • Parameters

    • fd: number

    Returns void

copyFilePromise

  • Parameters

    Returns Promise<void>

copyFileSync

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

createReadStream

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

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

    Returns ReadStream

createWriteStream

  • 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

existsPromise

  • Parameters

    Returns Promise<boolean>

existsSync

  • Parameters

    Returns boolean

fchmodPromise

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

    • fd: number
    • mask: number

    Returns Promise<void>

fchmodSync

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

    • fd: number
    • mask: number

    Returns void

fchownPromise

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

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

    Returns Promise<void>

fchownSync

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

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

    Returns void

fstatPromise

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

fstatSync

  • fstatSync(fd: number): Stats
  • fstatSync(fd: number, opts: { bigint: true }): BigIntStats
  • fstatSync(fd: number, opts?: { bigint: boolean }): Stats | BigIntStats
  • Parameters

    • fd: number

    Returns Stats

ftruncatePromise

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

    • fd: number
    • optionallen: number

    Returns Promise<void>

ftruncateSync

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

getBaseFs

getExtractHint

  • @deprecated: Moved to jsInstallUtils


    Parameters

    Returns boolean

getRealPath

getTarget

linkPromise

linkSync

lockPromise

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

    • T

    Parameters

    Returns Promise<T>

lstatPromise

  • Parameters

    Returns Promise<Stats>

lstatSync

  • Parameters

    Returns Stats

lutimesPromise

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

lutimesSync

  • 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

mkdirPromise

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

mkdirSync

  • 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

openPromise

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

    Returns Promise<number>

openSync

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

    Returns number

opendirPromise

  • Parameters

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

    Returns Promise<Dir<PortablePath>>

opendirSync

  • Parameters

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

    Returns Dir<PortablePath>

preserveTimePromise

  • Parameters

    Returns Promise<void>

preserveTimeSync

readFilePromise

  • Parameters

    Returns Promise<Buffer>

readFileSync

  • Parameters

    Returns Buffer

readJsonPromise

  • Parameters

    Returns Promise<any>

readJsonSync

  • Parameters

    Returns any

readPromise

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

readSync

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

    • fd: number
    • buffer: Buffer
    • offset: number
    • length: number
    • position: number

    Returns number

readdirPromise

  • Parameters

    Returns Promise<Filename[]>

readdirSync

readlinkPromise

readlinkSync

realpathPromise

realpathSync

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

renamePromise

renameSync

resolve

rmPromise

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

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

    Returns Promise<void>

rmSync

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

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

    Returns void

rmdirPromise

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

rmdirSync

  • 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

statPromise

  • Parameters

    Returns Promise<Stats>

statSync

  • Parameters

    Returns Stats

symlinkPromise

symlinkSync

truncatePromise

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

    Returns Promise<void>

truncateSync

  • Parameters

    Returns void

unlinkPromise

  • Parameters

    Returns Promise<void>

unlinkSync

  • Parameters

    Returns void

unwatchFile

utimesPromise

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

utimesSync

  • 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

watch

watchFile

writeFilePromise

writeFileSync

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

writePromise

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

writeSync

  • 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