ZenFS
    Preparing search index...

    Class InodeInternal

    Generic inode definition that can easily be serialized.

    Hierarchy

    • BufferView
      • Inode

    Implements

    Index

    Constructors

    • Parameters

      • ...args:
            | [
                _buffer?: | number
                | ArrayBufferLike
                | ArrayBufferView<ArrayBufferLike>
                | ArrayLike<number>,
                _byteOffset?: number,
                _byteLength?: number,
            ]
            | [Readonly<Partial<InodeLike>>]

      Returns Inode

    Properties

    "[toStringTag]": string
    buffer: ArrayBufferLike
    byteLength: number
    byteOffset: number

    Accessors

    __after_flags: any

    For future use

    __data_old: any

    For future use

    __ino_old: any

    For future use

    __padding: any

    Padding up to 128 bytes. This ensures there is enough room for expansion without breaking the ABI.

    atimeMs: any

    Time of last access, since epoch

    attributes: any
    birthtimeMs: any

    Time of file creation, since epoch

    ctimeMs: any

    The time the inode was changed.

    This is automatically updated whenever changed are made using update().

    data: any
    flags: any
    gid: any

    The id of the group that owns the file

    ino: any

    Inode number

    mode: any

    Unix-style file mode (e.g. 0o644) that includes the item type

    mtimeMs: any

    Time of last modification, since epoch

    nlink: any

    Number of hard links

    size: any

    Size of the item in bytes. For directories/symlinks, this is normally the size of the struct that represents the item.

    uid: any

    The id of the user that owns the file

    version: any

    The "version" of the inode/data. Unrelated to the inode format!

    Methods

    • Gets the BigInt64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns bigint

    • Gets the BigUint64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns bigint

    • Gets the Float16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Float32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Float64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Int16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Int32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Int8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      Returns number

    • Gets the Uint16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Uint32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be read.

      Returns number

    • Gets the Uint8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be retrieved.

      Returns number

    • Stores a BigInt64 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: bigint

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores a BigUint64 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: bigint

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Float16 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Float32 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Float64 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Int16 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Int32 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Int8 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      Returns void

    • Stores an Uint16 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Uint32 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      • OptionallittleEndian: boolean

        If false or undefined, a big-endian value should be written.

      Returns void

    • Stores an Uint8 value at the specified byte offset from the start of the view.

      Parameters

      • byteOffset: number

        The place in the buffer at which the value should be set.

      • value: number

        The value to set.

      Returns void

    • Updates the Inode using information from the stats object. Used by file systems at sync time, e.g.:

      • Program opens file and gets a File object.
      • Program mutates file. File object is responsible for maintaining metadata changes locally -- typically in a Stats object.
      • Program closes file. File object's metadata changes are synced with the file system.

      Parameters

      Returns boolean

      whether any changes have occurred.