Class InodeInternal

Generic inode definition that can easily be serialized.

[BREAKING]

Implements

Constructors

Properties

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: bigint
gid: number

The id of the group that owns the file

ino: bigint

Inode number

mode: number

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

mtimeMs: number

Time of last modification, since epoch

nlink: number

Number of hard links

size: number

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

uid: number

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

    True if any changes have occurred.