Class Inode

Generic inode definition that can easily be serialized.

Implements

Constructors

Properties

buffer: ArrayBufferLike
view: DataView

Accessors

  • get ctimeMs(): number
  • time of last time file status was changed, in milliseconds since epoch

    Returns number

  • set ctimeMs(value): void
  • time of last time file status was changed, in milliseconds since epoch

    Parameters

    • value: number

    Returns void

  • get gid(): number
  • the id of the group that owns the file

    Returns number

  • set gid(value): void
  • the id of the group that owns the file

    Parameters

    • value: number

    Returns void

  • get mode(): number
  • Unix-style file mode (e.g. 0o644) that includes the item type Type of the item can be FILE, DIRECTORY, SYMLINK, or SOCKET

    Returns number

  • set mode(value): void
  • Unix-style file mode (e.g. 0o644) that includes the item type Type of the item can be FILE, DIRECTORY, SYMLINK, or SOCKET

    Parameters

    • value: number

    Returns void

  • get mtimeMs(): number
  • time of last modification, in milliseconds since epoch

    Returns number

  • set mtimeMs(value): void
  • time of last modification, in milliseconds since epoch

    Parameters

    • value: number

    Returns void

  • get size(): number
  • Size of the item in bytes. For directories/symlinks, this is normally the size of the struct that represents the item.

    Returns number

  • set size(value): void
  • Size of the item in bytes. For directories/symlinks, this is normally the size of the struct that represents the item.

    Parameters

    • value: number

    Returns void

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.