Class OverlayFSInternal

OverlayFS makes a read-only filesystem writable by storing writes on a second, writable file system. Deletes are persisted via metadata stored on the writable file system.

This class contains no locking whatsoever. It is mutexed to prevent races.

Hierarchy (View Summary)

Constructors

Properties

_disableSync?: boolean

Whether the sync cache should be disabled. Only affects async things.

readable: FileSystem
writable: FileSystem

Methods

  • Internal

    Called once to load up metadata stored on the writable file system.

    Returns Promise<void>

  • Reads into a buffer

    Parameters

    • path: string
    • buffer: Uint8Array<ArrayBufferLike>

      The buffer to read into. You must set the byteOffset and byteLength appropriately!

    • offset: number

      The offset into the file to start reading from

    • end: number

      The position in the file to stop reading

    Returns Promise<void>

  • Reads into a buffer

    Parameters

    • path: string
    • buffer: Uint8Array<ArrayBufferLike>

      The buffer to read into. You must set the byteOffset and byteLength appropriately!

    • offset: number

      The offset into the file to start reading from

    • end: number

      The position in the file to stop reading

    Returns void

  • Writes a buffer to a file

    Parameters

    • path: string
    • buffer: Uint8Array<ArrayBufferLike>

      The buffer to write. You must set the byteOffset and byteLength appropriately!

    • offset: number

      The offset in the file to start writing

    Returns Promise<void>

  • Writes a buffer to a file

    Parameters

    • path: string
    • buffer: Uint8Array<ArrayBufferLike>

      The buffer to write. You must set the byteOffset and byteLength appropriately!

    • offset: number

      The offset in the file to start writing

    Returns void