Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LockedFS<T>

This class serializes access to an underlying async filesystem. For example, on an OverlayFS instance with an async lower directory operations like rename and rmdir may involve multiple requests involving both the upper and lower filesystems -- they are not executed in a single atomic step. OverlayFS uses this LockedFS to avoid having to reason about the correctness of multiple requests interleaving.

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Methods

appendFile

appendFileSync

  • appendFileSync(fname: string, data: any, encoding: string, flag: FileFlag, mode: number): void

chmod

chmodSync

  • chmodSync(p: string, isLchmod: boolean, mode: number): void

chown

  • chown(p: string, isLchown: boolean, uid: number, gid: number, cb: BFSOneArgCallback): void

chownSync

  • chownSync(p: string, isLchown: boolean, uid: number, gid: number): void

diskSpace

  • diskSpace(p: string, cb: function): void
  • Parameters

    • p: string
    • cb: function
        • (total: number, free: number): any
        • Parameters

          • total: number
          • free: number

          Returns any

    Returns void

exists

  • exists(p: string, cb: function): void
  • Parameters

    • p: string
    • cb: function
        • (exists: boolean): void
        • Parameters

          • exists: boolean

          Returns void

    Returns void

existsSync

  • existsSync(p: string): boolean

getFSUnlocked

  • getFSUnlocked(): T

getName

  • getName(): string

initialize

isReadOnly

  • isReadOnly(): boolean

link

linkSync

  • linkSync(srcpath: string, dstpath: string): void

mkdir

mkdirSync

  • mkdirSync(p: string, mode: number): void

open

openSync

readFile

readFileSync

  • readFileSync(fname: string, encoding: string, flag: FileFlag): any

readdir

readdirSync

  • readdirSync(p: string): string[]

readlink

readlinkSync

  • readlinkSync(p: string): string

realpath

  • realpath(p: string, cache: object, cb: BFSCallback): void

realpathSync

  • realpathSync(p: string, cache: object): string

rename

renameSync

  • renameSync(oldPath: string, newPath: string): void

rmdir

rmdirSync

  • rmdirSync(p: string): void

stat

  • stat(p: string, isLstat: boolean, cb: BFSCallback): void

statSync

  • statSync(p: string, isLstat: boolean): Stats

supportsLinks

  • supportsLinks(): boolean

supportsProps

  • supportsProps(): boolean

supportsSynch

  • supportsSynch(): boolean

symlink

  • symlink(srcpath: string, dstpath: string, type: string, cb: BFSOneArgCallback): void

symlinkSync

  • symlinkSync(srcpath: string, dstpath: string, type: string): void

truncate

truncateSync

  • truncateSync(p: string, len: number): void

unlink

unlinkSync

  • unlinkSync(p: string): void

utimes

utimesSync

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

writeFile

writeFileSync

  • writeFileSync(fname: string, data: any, encoding: string, flag: FileFlag, mode: number): void

Generated using TypeDoc