Class InodeInternal

Generic inode definition that can easily be serialized.

Implements

Constructors

Properties

__after_flags: number = 0

For future use

__data_old: number = 0

For future use

__ino_old: number = 0

For future use

__padding: never[] = []

Pad to 128 bytes

atimeMs: number = ...

Time of last access, since epoch

attributes: Attributes = ...
birthtimeMs: number = ...

Time of file creation, since epoch

ctimeMs: number = ...

The time the inode was changed.

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

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

version: number = 0

The "version" of the inode/data.

Unrelated to the inode format!

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.

MMNEPVFCICPMFPCPTTAAATR