ZenFS
    Preparing search index...

    Class CopyOnWriteFSInternal

    Using a readable file system as a base, writes are done to a writable file system.

    Hierarchy (View Summary)

    Index
    _mountPoint?: string

    The last place this file system was mounted

    _uuid: `${string}-${string}-${string}-${string}-${string}` = ...

    The UUID of the file system.

    attributes: ConstMap<
        FileSystemAttributes,
        keyof FileSystemAttributes,
        void
        | CaseFold
        | undefined,
    > & Map<string, any> = ...

    FileSystemAttributes

    inos: Map<string, number> = ...

    Inode numbers presented to the VFS for each path.

    The readable and writable layers allocate inode numbers independently, so they can collide. They can not be used as-is, since the VFS uses ino to tell files apart. This also keeps a file's inode number stable when it is copied up to the writable layer.

    journal: Journal = ...

    The journal to use for persisting deletions

    label?: string
    name: string

    The name for this file system. For example, tmpfs for an in memory one

    readable: FileSystem

    The file system that initially populates this file system.

    type: number

    A unique ID for this kind of file system. Currently unused internally, but could be used for partition tables or something

    writable: FileSystem

    The file system to write modified files to.

    • get uuid(): `${string}-${string}-${string}-${string}-${string}`

      Returns `${string}-${string}-${string}-${string}-${string}`

    • Reads into a buffer

      Parameters

      • path: string
      • buffer: Uint8Array

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

      • offset: number
      • end: number

        The position in the file to stop reading

      Returns Promise<void>

    • Reads into a buffer

      Parameters

      • path: string
      • buffer: Uint8Array

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

      • offset: number
      • end: number

        The position in the file to stop reading

      Returns void

    • Moves the public inode numbers for a rename, including a directory's descendants

      Parameters

      • oldPath: string
      • newPath: string

      Returns void

    • Writes a buffer to a file

      Parameters

      • path: string
      • buffer: Uint8Array

        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

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

      • offset: number

        The offset in the file to start writing

      Returns void