Class BigIntStats

Stats with bigint

Todo

Implement with bigint instead of wrapping Stats

Hierarchy

Implements

  • BigIntStats

Constructors

  • Provides information about a particular entry in the file system.

    Parameters

    • itemType: FileType = FileType.FILE

      Type of the item (FILE, DIRECTORY, SYMLINK, or SOCKET)

    • size: number | bigint = -1

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

    • Optional mode: number | bigint

      Unix-style file mode (e.g. 0o644)

    • Optional atimeMs: number | bigint

      time of last access, in milliseconds since epoch

    • Optional mtimeMs: number | bigint

      time of last modification, in milliseconds since epoch

    • Optional ctimeMs: number | bigint

      time of last time file status was changed, in milliseconds since epoch

    • Optional uid: number | bigint

      the id of the user that owns the file

    • Optional gid: number | bigint

      the id of the group that owns the file

    • Optional birthtimeMs: number | bigint

      time of file creation, in milliseconds since epoch

    Returns BigIntStats

Properties

_isBigint: boolean = true
atimeMs: bigint
atimeNs: bigint
birthtimeMs: bigint
birthtimeNs: bigint
blksize: bigint = ...

blocksize for file system I/O

blocks: bigint
ctimeMs: bigint
ctimeNs: bigint
dev: bigint = ...

ID of device containing file

fileData: Uint8Array = null

Some file systems stash data on stats objects.

gid: bigint = ...

group ID of owner

ino: bigint = ...

inode number

mode: bigint
mtimeMs: bigint
mtimeNs: bigint
nlink: bigint = ...

number of hard links

rdev: bigint = ...

device ID (if special file)

size: bigint
uid: bigint = ...

user ID of owner

Accessors

  • get _typename(): string
  • Returns string

  • get _typename_inverse(): string
  • Returns string

  • get atime(): Date
  • Returns Date

  • get birthtime(): Date
  • Returns Date

  • get ctime(): Date
  • Returns Date

  • get mtime(): Date
  • Returns Date

Methods

  • Change the mode of the file. We use this helper function to prevent messing up the type of the file, which is encoded in mode.

    Parameters

    • mode: number

    Returns void

  • Change the owner user/group of the file. This function makes sure it is a valid UID/GID (that is, a 32 unsigned int)

    Parameters

    • uid: number | bigint
    • gid: number | bigint

    Returns void

  • Checks if a given user/group has access to this item

    Parameters

    • mode: number

      The request access as 4 bits (unused, read, write, execute)

    • cred: Cred

    Returns boolean

    [Boolean] True if the request has access, false if the request does not

  • Returns boolean

    [Boolean] True if this item is a directory.

  • Returns boolean

    [Boolean] True if this item is a file.

  • Returns boolean

    [Boolean] True if this item is a symbolic link (only valid through lstat)

Generated using TypeDoc