Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ZipFS

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

Properties

Private baseFs

baseFs: FakeFS<PortablePath> | null

Private entries

entries: Map<PortablePath, number> = new Map()

Private fds

fds: Map<number, object> = new Map()

Private fileSources

fileSources: Map<number, Buffer> = new Map()

A cache of indices mapped to file sources. Populated by setFileSource calls. Required for supporting read after write.

Private level

Private libzip

libzip: Libzip

Private listings

listings: Map<PortablePath, Set<Filename>> = new Map()

Private lzSource

lzSource: number | null = null

Private nextFd

nextFd: number = 0

Private path

path: PortablePath | null

pathUtils

Private readOnly

readOnly: boolean = false

Private ready

ready: boolean = false

Private stats

stats: Stats

Private symlinkCount

symlinkCount: number

Private zip

zip: number

Static DEFAULT_TIME

DEFAULT_TIME: number = 315532800

Methods

accessPromise

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

accessSync

Private allocateBuffer

  • allocateBuffer(content: string | Buffer | ArrayBuffer | DataView): object

Private allocateSource

  • allocateSource(content: string | Buffer | ArrayBuffer | DataView): number

Private allocateUnattachedSource

  • allocateUnattachedSource(content: string | Buffer | ArrayBuffer | DataView): any

appendFilePromise

appendFileSync

changeFilePromise

changeFileSync

chmodPromise

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

chmodSync

chownPromise

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

chownSync

  • chownSync(p: PortablePath, uid: number, gid: number): void

closePromise

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

closeSync

  • closeSync(fd: number): void

copyFilePromise

copyFileSync

copyPromise

  • copyPromise(destination: PortablePath, source: PortablePath, options?: undefined | object): Promise<void>
  • copyPromise<P2>(destination: PortablePath, source: P2, options: object): Promise<void>

copySync

createReadStream

  • createReadStream(p: PortablePath | null, __namedParameters?: object): ReadStream

createWriteStream

  • createWriteStream(p: PortablePath | null, __namedParameters?: object): WriteStream

Private deleteEntry

discardAndClose

  • discardAndClose(): void

existsPromise

existsSync

fstatPromise

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

fstatSync

genTraversePromise

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

getAllFiles

  • getAllFiles(): (string & object)[]

getBufferAndClose

  • getBufferAndClose(): Buffer

getExtractHint

Private getFileSource

  • getFileSource(index: number): Buffer
  • getFileSource(index: number, opts: object): Buffer
  • getFileSource(index: number, opts: object): Promise<Buffer>
  • getFileSource(index: number, opts: object): Promise<Buffer> | Buffer

getRealPath

  • getRealPath(): string & object

Private getUnixMode

  • getUnixMode(index: number, defaultMode: number): number

hasOpenFileHandles

  • hasOpenFileHandles(): boolean

Private hydrateDirectory

Private isSymbolicLink

  • isSymbolicLink(index: number): boolean

linkPromise

linkSync

lockPromise

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

lstatPromise

lstatSync

lutimesPromise

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

lutimesSync

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

makeLibzipError

mkdirPromise

mkdirSync

  • mkdirSync(p: PortablePath, __namedParameters?: object): void

mkdirpPromise

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

mkdirpSync

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

movePromise

moveSync

openPromise

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

openSync

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

opendirPromise

opendirSync

Private prepareClose

  • prepareClose(): void

Private prepareCopyFile

Private prepareReadlink

Private prepareWriteFile

preserveTimePromise

  • preserveTimePromise(p: PortablePath, cb: function): Promise<void>

preserveTimeSync

  • preserveTimeSync(p: PortablePath, cb: function): Promise<void>

Private readFileBuffer

readFilePromise

readFileSync

readJsonPromise

readJsonSync

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

readdirPromise

readdirSync

readlinkPromise

  • readlinkPromise(p: PortablePath): Promise<string & object>

readlinkSync

realpathPromise

  • realpathPromise(p: PortablePath): Promise<string & object>

realpathSync

Private registerEntry

Private registerListing

removePromise

  • removePromise(p: PortablePath, __namedParameters?: object): Promise<void>

removeSync

  • removeSync(p: PortablePath, __namedParameters?: object): void

renamePromise

renameSync

resolve

Private resolveFilename

rmdirPromise

rmdirSync

  • rmdirSync(p: PortablePath, __namedParameters?: object): void

saveAndClose

  • saveAndClose(): void

Private setFileSource

  • setFileSource(p: PortablePath, content: string | Buffer | ArrayBuffer | DataView): any

Private statImpl

statPromise

statSync

symlinkPromise

symlinkSync

truncatePromise

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

truncateSync

unlinkPromise

unlinkSync

Private unregisterEntry

Private unregisterListing

unwatchFile

Private utimesImpl

  • utimesImpl(resolvedP: PortablePath, mtime: Date | string | number): void

utimesPromise

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

utimesSync

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

watch

watchFile

writeFilePromise

writeFileSync

writeJsonPromise

  • writeJsonPromise(p: PortablePath, data: any): Promise<void>

writeJsonSync

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