Skip to content

Inode

Defined in: src/internal/inode.ts:327

Internal

Generic inode definition that can easily be serialized.

  • object

new Inode(…args): Inode

Defined in: src/internal/inode.ts:330

[number | ArrayBufferLike | ArrayBufferView<ArrayBufferLike> | ArrayLike<number>, number, number] | [Readonly<Partial<InodeLike<number>>>]

Inode

$from(BufferView).constructor

readonly [toStringTag]: string

Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:274

SingleBufferStore.[toStringTag]


readonly buffer: any

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1731

The ArrayBuffer instance referenced by the array.

$from(BufferView).buffer


readonly byteLength: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1736

The length in bytes of the array.

$from(BufferView).byteLength


readonly byteOffset: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1741

The offset in bytes of the array.

$from(BufferView).byteOffset


constructor: StructConstructor<BufferView<any>>

Defined in: node_modules/memium/dist/structs.shared.d.ts:5

$from(BufferView).constructor


readonly static alignment: number

Defined in: node_modules/memium/dist/structs.shared.d.ts:11

SuperBlock.alignment


readonly static optional array?: TypeArrayConstructor<BufferView<any> & ArrayBufferView<ArrayBufferLike>>

Defined in: node_modules/memium/dist/types.d.ts:14

$from(BufferView).array


readonly static optional isDynamic?: boolean

Defined in: node_modules/memium/dist/structs.shared.d.ts:13

SuperBlock.isDynamic


readonly static isUnion: boolean

Defined in: node_modules/memium/dist/structs.shared.d.ts:12

SuperBlock.isUnion


static name: string = 'Inode'

Defined in: src/internal/inode.ts:328

$from(BufferView).name


readonly static size: number

Defined in: node_modules/memium/dist/types.d.ts:13

SuperBlock.size

Defined in: src/internal/inode.ts:384

For future use


Defined in: src/internal/inode.ts:362

For future use


Defined in: src/internal/inode.ts:381

For future use


Defined in: src/internal/inode.ts:399

Internal

Padding up to 128 bytes. This ensures there is enough room for expansion without breaking the ABI.


Defined in: src/internal/inode.ts:368

Time of last access, since epoch

InodeLike.atimeMs


Defined in: src/internal/inode.ts:401

Extended attributes

InodeLike.attributes


Defined in: src/internal/inode.ts:369

Time of file creation, since epoch

InodeLike.birthtimeMs


Defined in: src/internal/inode.ts:377

The time the inode was changed.

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

InodeLike.ctimeMs


Defined in: src/internal/inode.ts:360

InodeLike.data


Defined in: src/internal/inode.ts:382

InodeLike.flags


Defined in: src/internal/inode.ts:367

The id of the group that owns the file

InodeLike.gid


Defined in: src/internal/inode.ts:379

Inode number

InodeLike.ino


Defined in: src/internal/inode.ts:364

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

InodeLike.mode


Defined in: src/internal/inode.ts:370

Time of last modification, since epoch

InodeLike.mtimeMs


Defined in: src/internal/inode.ts:365

Number of hard links

InodeLike.nlink


Defined in: src/internal/inode.ts:392

Device ID for special files

InodeLike.rdev


Defined in: src/internal/inode.ts:363

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

InodeLike.size


Defined in: src/internal/inode.ts:366

The id of the user that owns the file

InodeLike.uid


Defined in: src/internal/inode.ts:390

The “version” of the inode/data. Unrelated to the inode format!

InodeLike.version

getBigInt64(byteOffset, littleEndian?): bigint

Defined in: ../../node_modules/typescript/lib/lib.es2020.bigint.d.ts:732

Gets the BigInt64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

bigint

$from(BufferView).getBigInt64


getBigUint64(byteOffset, littleEndian?): bigint

Defined in: ../../node_modules/typescript/lib/lib.es2020.bigint.d.ts:740

Gets the BigUint64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

bigint

$from(BufferView).getBigUint64


getFloat16(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es2025.float16.d.ts:434

Gets the Float16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getFloat16


getFloat32(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1754

Gets the Float32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getFloat32


getFloat64(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1762

Gets the Float64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getFloat64


getInt16(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1777

Gets the Int16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getInt16


getInt32(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1784

Gets the Int32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getInt32


getInt8(byteOffset): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1769

Gets the Int8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

number

$from(BufferView).getInt8


getUint16(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1799

Gets the Uint16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getUint16


getUint32(byteOffset, littleEndian?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1807

Gets the Uint32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

boolean

If false or undefined, a big-endian value should be read.

number

$from(BufferView).getUint32


getUint8(byteOffset): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1791

Gets the Uint8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

number

The place in the buffer at which the value should be retrieved.

number

$from(BufferView).getUint8


setBigInt64(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es2020.bigint.d.ts:748

Stores a BigInt64 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

bigint

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setBigInt64


setBigUint64(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es2020.bigint.d.ts:756

Stores a BigUint64 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

bigint

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setBigUint64


setFloat16(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es2025.float16.d.ts:442

Stores an Float16 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setFloat16


setFloat32(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1815

Stores an Float32 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setFloat32


setFloat64(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1823

Stores an Float64 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setFloat64


setInt16(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1838

Stores an Int16 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setInt16


setInt32(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1846

Stores an Int32 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setInt32


setInt8(byteOffset, value): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1830

Stores an Int8 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

void

$from(BufferView).setInt8


setUint16(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1861

Stores an Uint16 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setUint16


setUint32(byteOffset, value, littleEndian?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1869

Stores an Uint32 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

boolean

If false or undefined, a big-endian value should be written.

void

$from(BufferView).setUint32


setUint8(byteOffset, value): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1853

Stores an Uint8 value at the specified byte offset from the start of the view.

number

The place in the buffer at which the value should be set.

number

The value to set.

void

$from(BufferView).setUint8


toJSON(): InodeLike

Defined in: src/internal/inode.ts:414

InodeLike


toStats(): Stats

Defined in: src/internal/inode.ts:425

Handy function that converts the Inode to a Node Stats object.

Stats


toString(): string

Defined in: src/internal/inode.ts:410

Returns a string representation of an object.

string


update(data?): boolean

Defined in: src/internal/inode.ts:439

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.

Partial<Readonly<InodeLike<number>>>

boolean

whether any changes have occurred.


static get(this, buffer, offset): BufferView<any> & ArrayBufferView<ArrayBufferLike>

Defined in: node_modules/memium/dist/types.d.ts:17

Get a value from a buffer

void

ArrayBufferLike

number

BufferView<any> & ArrayBufferView<ArrayBufferLike>

$from(BufferView).get


static set(this, buffer, offset, value): void

Defined in: node_modules/memium/dist/types.d.ts:19

Set a value in a buffer

void

ArrayBufferLike

number

BufferView<any> & ArrayBufferView<ArrayBufferLike>

void

$from(BufferView).set