Class InodeInternal

Generic inode definition that can easily be serialized.

[BREAKING] Remove 58 byte Inode upgrade path

Implements

Constructors

  • Parameters

    • Optionaldata:
          | ArrayBufferLike
          | ArrayBufferView<ArrayBufferLike>
          | Readonly<Partial<InodeLike>>

    Returns Inode

Properties

__data_old: number = 0

For future use

__ino_old: number = 0

For future use

__padding: number = 0

For future use

atimeMs: number = ...

Time of last access, since epoch

birthtimeMs: number = ...

Time of file creation, since epoch

ctimeMs: number = ...

Time of last time file status was changed, since epoch

data: number = ...
flags: number = 0
gid: number = 0

The id of the group that owns the file

ino: number = ...

Inode number

mode: number = 0

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

mtimeMs: number = ...

Time of last modification, since epoch

nlink: number = 1

Number of hard links

size: number = 0

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

uid: number = 0

The id of the user that owns the file

Methods

  • 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.