Options
All
  • Public
  • Public/Protected
  • All
Menu

Package yarnpkg-fslib

Type aliases

AliasFSOptions

AliasFSOptions<P>: object

Type parameters

Type declaration

ChangeFileOptions

ChangeFileOptions: Partial<object>

CopyOptions

CopyOptions: object

Type declaration

  • overwrite: boolean

CreateReadStreamOptions

CreateReadStreamOptions: Partial<object>

CreateWriteStreamOptions

CreateWriteStreamOptions: Partial<object>

CwdFSOptions

CwdFSOptions: object

Type declaration

Dirent

Dirent: Exclude<NodeDirent, "name"> & object

ExtractHintOptions

ExtractHintOptions: object

Type declaration

  • relevantExtensions: Set<string>

FSPath

FSPath<T>: T | number

Type parameters

Filename

Filename: string & object & object & object

JailFSOptions

JailFSOptions: object

Type declaration

LazyFSFactory

LazyFSFactory<P>: function

Type parameters

Type declaration

MkdirOptions

MkdirOptions: Partial<object>

NativePath

NativePath: string & object

Operations

Operations: Array<function>

Path

PortablePath

PortablePath: string & object

SymlinkType

SymlinkType: "file" | "dir" | "junction"

UTimes

UTimes<P>: Array<[P, Date, Date]>

Type parameters

VirtualFSOptions

VirtualFSOptions: object

Type declaration

WatchCallback

WatchCallback: function

Type declaration

    • (eventType: string, filename: string): void
    • Parameters

      • eventType: string
      • filename: string

      Returns void

WatchOptions

WatchOptions: Partial<object> | string

Watcher

Watcher: object

Type declaration

  • close: function
      • (): void
      • Returns void

  • on: any

WriteFileOptions

WriteFileOptions: Partial<object> | string

XFS

XFS: NodeFS & object

ZipBufferOptions

ZipBufferOptions: object

Type declaration

  • libzip: Libzip
  • Optional readOnly?: undefined | false | true
  • Optional stats?: Stats

ZipOpenFSOptions

ZipOpenFSOptions: object

Type declaration

  • Optional baseFs?: FakeFS<PortablePath>
  • Optional filter?: RegExp | null
  • libzip: Libzip
  • Optional maxOpenFiles?: undefined | number
  • Optional readOnlyArchives?: undefined | false | true
  • Optional useCache?: undefined | false | true

ZipPathOptions

ZipPathOptions: ZipBufferOptions & object

Variables

Const JAIL_ROOT

JAIL_ROOT: string & object = PortablePath.root

Const NUMBER_REGEXP

NUMBER_REGEXP: RegExp = /^[0-9]+$/

Const PORTABLE_PATH_REGEXP

PORTABLE_PATH_REGEXP: RegExp = /^\/[a-zA-Z]:.*$/

Const S_IFDIR

S_IFDIR: 16384 = 16384

Const S_IFLNK

S_IFLNK: 40960 = 40960

Const S_IFMT

S_IFMT: 61440 = 61440

Const S_IFREG

S_IFREG: 32768 = 32768

Const VIRTUAL_REGEXP

VIRTUAL_REGEXP: RegExp = /^(\/(?:[^\/]+\/)*?\$\$virtual)((?:\/([^\/]+)(?:\/([^\/]+))?)?((?:\/.*)?))$/

Const WINDOWS_PATH_REGEXP

WINDOWS_PATH_REGEXP: RegExp = /^[a-zA-Z]:.*$/

Const ZIP_FD

ZIP_FD: 2147483648 = 2147483648

Let cleanExitRegistered

cleanExitRegistered: boolean = false

Const npath

npath: PathUtils<NativePath> & ConvertUtils = Object.create(path) as any

Const ppath

ppath: PathUtils<PortablePath> = Object.create(path.posix) as any

Const tmpdirs

tmpdirs: Set<string & object> = new Set<PortablePath>()

Const xfs

xfs: XFS = Object.assign(new NodeFS(), {detachTemp(p: PortablePath) {tmpdirs.delete(p);},mktempSync<T>(this: XFS, cb?: (p: PortablePath) => T) {registerCleanExit();while (true) {const p = getTempName(`xfs-`);try {this.mkdirSync(p);} catch (error) {if (error.code === `EEXIST`) {continue;} else {throw error;}}const realP = this.realpathSync(p);tmpdirs.add(realP);if (typeof cb !== `undefined`) {try {return cb(realP);} finally {if (tmpdirs.has(realP)) {tmpdirs.delete(realP);try {this.removeSync(realP);} catch {// Too bad if there's an error}}}} else {return p;}}},async mktempPromise<T>(this: XFS, cb?: (p: PortablePath) => Promise<T>) {registerCleanExit();while (true) {const p = getTempName(`xfs-`);try {await this.mkdirPromise(p);} catch (error) {if (error.code === `EEXIST`) {continue;} else {throw error;}}const realP = await this.realpathPromise(p);tmpdirs.add(realP);if (typeof cb !== `undefined`) {try {return await cb(realP);} finally {if (tmpdirs.has(realP)) {tmpdirs.delete(realP);try {await this.removePromise(realP);} catch {// Too bad if there's an error}}}} else {return realP;}}},})

Functions

EBADF

  • EBADF(reason: string): Error & object

EBUSY

  • EBUSY(message: string): Error & object

EEXIST

  • EEXIST(reason: string): Error & object

EINVAL

  • EINVAL(reason: string): Error & object

EISDIR

  • EISDIR(reason: string): Error & object

ENOENT

  • ENOENT(reason: string): Error & object

ENOSYS

  • ENOSYS(message: string, reason: string): Error & object

ENOTDIR

  • ENOTDIR(reason: string): Error & object

EROFS

  • EROFS(reason: string): Error & object

Const contains

  • contains<T>(pathUtils: PathUtils<T>, from: T, to: T): null | T

convertPath

  • convertPath<P>(targetPathUtils: PathUtils<P>, sourcePath: Path): P

copyFile

  • copyFile<P1, P2>(operations: Operations, utimes: UTimes<P1>, destinationFs: FakeFS<P1>, destination: P1, destinationStat: Stats | null, sourceFs: FakeFS<P2>, source: P2, sourceStat: Stats, opts: CopyOptions): Promise<void>

copyFolder

  • copyFolder<P1, P2>(operations: Operations, utimes: UTimes<P1>, destinationFs: FakeFS<P1>, destination: P1, destinationStat: Stats | null, sourceFs: FakeFS<P2>, source: P2, sourceStat: Stats, opts: CopyOptions): Promise<void>

copyImpl

copyPromise

  • copyPromise<P1, P2>(destinationFs: FakeFS<P1>, destination: P1, sourceFs: FakeFS<P2>, source: P2, opts: CopyOptions): Promise<void>

copySymlink

  • copySymlink<P1, P2>(operations: Operations, utimes: UTimes<P1>, destinationFs: FakeFS<P1>, destination: P1, destinationStat: Stats | null, sourceFs: FakeFS<P2>, source: P2, sourceStat: Stats, opts: CopyOptions): Promise<void>

extendFs

fromPortablePath

getEndOfLine

  • getEndOfLine(content: string): string

getTempName

  • getTempName(prefix: string): string & object

makeDefaultStats

makeError

  • makeError(code: string, message: string): Error & object

Const makeError

  • makeError(): Error & object

maybeLStat

  • maybeLStat<P>(baseFs: FakeFS<P>, p: P): Promise<null | Stats>

normalizeLineEndings

  • normalizeLineEndings(originalContent: string, newContent: string): string

patchFs

registerCleanExit

  • registerCleanExit(): void

toFilename

  • toFilename(filename: string): Filename

toPortablePath

toUnixTimestamp

  • toUnixTimestamp(time: Date | string | number): string | number | Date

Object literals

Const Filename

Filename: object

lockfile

lockfile: string & object & object & object = `yarn.lock` as Filename

manifest

manifest: string & object & object & object = `package.json` as Filename

nodeModules

nodeModules: string & object & object & object = `node_modules` as Filename

Const PortablePath

PortablePath: object

dot

dot: string & object = `.` as PortablePath

root

root: string & object = `/` as PortablePath

Generated using TypeDoc