Skip to main content

PosixFS

Hierarchy

Index

Constructors

constructor

Properties

publicreadonlypathUtils

pathUtils: PathUtils<NativePath>

Methods

accessPromise

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

    Returns Promise<void>

accessSync

  • Parameters

    Returns void

appendFilePromise

appendFileSync

changeFilePromise

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

    Returns Promise<void>

changeFileSync

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

    Returns void

checksumFilePromise

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

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

    Returns Promise<string>

chmodPromise

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

    Returns Promise<void>

chmodSync

  • Parameters

    Returns void

chownPromise

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

    Returns Promise<void>

chownSync

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

  • Parameters

    Returns void

copyPromise

  • copyPromise(destination: NativePath, source: NativePath, options?: { baseFs?: undefined; linkStrategy?: null | LinkStrategy<NativePath>; overwrite?: boolean; stableSort?: boolean; stableTime?: boolean }): Promise<void>
  • copyPromise<P2>(destination: NativePath, source: P2, options: { baseFs: FakeFS<P2>; linkStrategy?: null | LinkStrategy<NativePath>; overwrite?: boolean; stableSort?: boolean; stableTime?: boolean }): Promise<void>
  • Parameters

    Returns Promise<void>

copySync

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

    Prefer using copyPromise instead


    Parameters

    • destination: NativePath
    • source: NativePath
    • optionaloptions: { baseFs?: undefined; overwrite?: boolean }

    Returns void

createReadStream

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

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

    Returns ReadStream

createWriteStream

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

    • p: null | NativePath
    • 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: NativePath, __namedParameters?: { stableSort?: boolean }): AsyncGenerator<NativePath, void, unknown>
  • Parameters

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

    Returns AsyncGenerator<NativePath, void, unknown>

getExtractHint

  • @deprecated: Moved to jsInstallUtils


    Parameters

    Returns boolean

getRealPath

  • Returns NativePath

linkPromise

  • Parameters

    Returns Promise<void>

linkSync

lockPromise

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

    • T

    Parameters

    • affectedPath: NativePath
    • callback: () => Promise<T>

    Returns Promise<T>

lstatPromise

  • Parameters

    Returns Promise<Stats>

lstatSync

  • Parameters

    Returns Stats

lutimesPromise

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

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

    Returns Promise<void>

lutimesSync

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

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

    Returns void

mkdirPromise

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

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

    Returns Promise<undefined | string>

mkdirSync

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

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

    Returns undefined | string

mkdirpPromise

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

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

    Returns Promise<undefined | string>

mkdirpSync

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

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

    Returns undefined | string

movePromise

moveSync

openPromise

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

    Returns Promise<number>

openSync

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

    Returns number

opendirPromise

  • opendirPromise(p: NativePath, opts?: Partial<{ bufferSize: number; recursive: boolean }>): Promise<Dir<NativePath>>
  • Parameters

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

    Returns Promise<Dir<NativePath>>

opendirSync

  • Parameters

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

    Returns Dir<NativePath>

preserveTimePromise

  • Parameters

    Returns Promise<void>

preserveTimeSync

  • Parameters

    Returns Promise<void>

readFilePromise

  • readFilePromise(p: FSPath<NativePath>, encoding?: null): Promise<Buffer>
  • readFilePromise(p: FSPath<NativePath>, encoding: BufferEncoding): Promise<string>
  • readFilePromise(p: FSPath<NativePath>, encoding?: null | BufferEncoding): Promise<string | Buffer>
  • 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

  • Parameters

    Returns Filename[]

readlinkPromise

readlinkSync

realpathPromise

realpathSync

removePromise

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

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

    Returns Promise<void>

removeSync

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

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

    Returns void

renamePromise

  • Parameters

    Returns Promise<void>

renameSync

resolve

rmPromise

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

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

    Returns Promise<void>

rmSync

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

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

    Returns void

rmdirPromise

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

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

    Returns Promise<void>

rmdirSync

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

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

    Returns void

statPromise

  • Parameters

    Returns Promise<Stats>

statSync

  • Parameters

    Returns Stats

symlinkPromise

symlinkSync

truncatePromise

  • truncatePromise(p: NativePath, 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: NativePath, atime: string | number | Date, mtime: string | number | Date): Promise<void>
  • Parameters

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

    Returns Promise<void>

utimesSync

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

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

    Returns void

watch

watchFile

writeFilePromise

writeFileSync

writeJsonPromise

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

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

    Returns Promise<void>

writeJsonSync

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

    • p: NativePath
    • 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