Inode
Defined in: src/internal/inode.ts:327
Internal
Generic inode definition that can easily be serialized.
Extends
Section titled “Extends”object
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Inode(…
args):Inode
Defined in: src/internal/inode.ts:330
Parameters
Section titled “Parameters”[number | ArrayBufferLike | ArrayBufferView<ArrayBufferLike> | ArrayLike<number>, number, number] | [Readonly<Partial<InodeLike<number>>>]
Returns
Section titled “Returns”Inode
Overrides
Section titled “Overrides”$from(BufferView).constructor
Properties
Section titled “Properties”[toStringTag]
Section titled “[toStringTag]”
readonly[toStringTag]:string
Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:274
Inherited from
Section titled “Inherited from”SingleBufferStore.[toStringTag]
buffer
Section titled “buffer”
readonlybuffer:any
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1731
The ArrayBuffer instance referenced by the array.
Inherited from
Section titled “Inherited from”$from(BufferView).buffer
byteLength
Section titled “byteLength”
readonlybyteLength:number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1736
The length in bytes of the array.
Inherited from
Section titled “Inherited from”$from(BufferView).byteLength
byteOffset
Section titled “byteOffset”
readonlybyteOffset:number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:1741
The offset in bytes of the array.
Inherited from
Section titled “Inherited from”$from(BufferView).byteOffset
constructor
Section titled “constructor”constructor:
StructConstructor<BufferView<any>>
Defined in: node_modules/memium/dist/structs.shared.d.ts:5
Inherited from
Section titled “Inherited from”$from(BufferView).constructor
alignment
Section titled “alignment”
readonlystaticalignment:number
Defined in: node_modules/memium/dist/structs.shared.d.ts:11
Inherited from
Section titled “Inherited from”array?
Section titled “array?”
readonlystaticoptionalarray?:TypeArrayConstructor<BufferView<any> &ArrayBufferView<ArrayBufferLike>>
Defined in: node_modules/memium/dist/types.d.ts:14
Inherited from
Section titled “Inherited from”$from(BufferView).array
isDynamic?
Section titled “isDynamic?”
readonlystaticoptionalisDynamic?:boolean
Defined in: node_modules/memium/dist/structs.shared.d.ts:13
Inherited from
Section titled “Inherited from”isUnion
Section titled “isUnion”
readonlystaticisUnion:boolean
Defined in: node_modules/memium/dist/structs.shared.d.ts:12
Inherited from
Section titled “Inherited from”
staticname:string='Inode'
Defined in: src/internal/inode.ts:328
Overrides
Section titled “Overrides”$from(BufferView).name
readonlystaticsize:number
Defined in: node_modules/memium/dist/types.d.ts:13
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”__after_flags
Section titled “__after_flags”Defined in: src/internal/inode.ts:384
For future use
__data_old
Section titled “__data_old”Defined in: src/internal/inode.ts:362
For future use
__ino_old
Section titled “__ino_old”Defined in: src/internal/inode.ts:381
For future use
__padding
Section titled “__padding”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.
atimeMs
Section titled “atimeMs”Defined in: src/internal/inode.ts:368
Time of last access, since epoch
Implementation of
Section titled “Implementation of”attributes
Section titled “attributes”Defined in: src/internal/inode.ts:401
Extended attributes
Implementation of
Section titled “Implementation of”birthtimeMs
Section titled “birthtimeMs”Defined in: src/internal/inode.ts:369
Time of file creation, since epoch
Implementation of
Section titled “Implementation of”ctimeMs
Section titled “ctimeMs”Defined in: src/internal/inode.ts:377
The time the inode was changed.
This is automatically updated whenever changed are made using update().
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:360
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:382
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:367
The id of the group that owns the file
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:379
Inode number
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:364
Unix-style file mode (e.g. 0o644) that includes the item type
Implementation of
Section titled “Implementation of”mtimeMs
Section titled “mtimeMs”Defined in: src/internal/inode.ts:370
Time of last modification, since epoch
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:365
Number of hard links
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:392
Device ID for special files
Implementation of
Section titled “Implementation of”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.
Implementation of
Section titled “Implementation of”Defined in: src/internal/inode.ts:366
The id of the user that owns the file
Implementation of
Section titled “Implementation of”version
Section titled “version”Defined in: src/internal/inode.ts:390
The “version” of the inode/data. Unrelated to the inode format!
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”getBigInt64()
Section titled “getBigInt64()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”bigint
Inherited from
Section titled “Inherited from”$from(BufferView).getBigInt64
getBigUint64()
Section titled “getBigUint64()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”bigint
Inherited from
Section titled “Inherited from”$from(BufferView).getBigUint64
getFloat16()
Section titled “getFloat16()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getFloat16
getFloat32()
Section titled “getFloat32()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getFloat32
getFloat64()
Section titled “getFloat64()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getFloat64
getInt16()
Section titled “getInt16()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getInt16
getInt32()
Section titled “getInt32()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getInt32
getInt8()
Section titled “getInt8()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getInt8
getUint16()
Section titled “getUint16()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getUint16
getUint32()
Section titled “getUint32()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be read.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getUint32
getUint8()
Section titled “getUint8()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be retrieved.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from(BufferView).getUint8
setBigInt64()
Section titled “setBigInt64()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
bigint
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setBigInt64
setBigUint64()
Section titled “setBigUint64()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
bigint
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setBigUint64
setFloat16()
Section titled “setFloat16()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setFloat16
setFloat32()
Section titled “setFloat32()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setFloat32
setFloat64()
Section titled “setFloat64()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setFloat64
setInt16()
Section titled “setInt16()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setInt16
setInt32()
Section titled “setInt32()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setInt32
setInt8()
Section titled “setInt8()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setInt8
setUint16()
Section titled “setUint16()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setUint16
setUint32()
Section titled “setUint32()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
littleEndian?
Section titled “littleEndian?”boolean
If false or undefined, a big-endian value should be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setUint32
setUint8()
Section titled “setUint8()”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.
Parameters
Section titled “Parameters”byteOffset
Section titled “byteOffset”number
The place in the buffer at which the value should be set.
number
The value to set.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).setUint8
toJSON()
Section titled “toJSON()”toJSON():
InodeLike
Defined in: src/internal/inode.ts:414
Returns
Section titled “Returns”toStats()
Section titled “toStats()”toStats():
Stats
Defined in: src/internal/inode.ts:425
Handy function that converts the Inode to a Node Stats object.
Returns
Section titled “Returns”toString()
Section titled “toString()”toString():
string
Defined in: src/internal/inode.ts:410
Returns a string representation of an object.
Returns
Section titled “Returns”string
update()
Section titled “update()”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.
Parameters
Section titled “Parameters”Partial<Readonly<InodeLike<number>>>
Returns
Section titled “Returns”boolean
whether any changes have occurred.
staticget(this,buffer,offset):BufferView<any> &ArrayBufferView<ArrayBufferLike>
Defined in: node_modules/memium/dist/types.d.ts:17
Get a value from a buffer
Parameters
Section titled “Parameters”void
buffer
Section titled “buffer”ArrayBufferLike
offset
Section titled “offset”number
Returns
Section titled “Returns”BufferView<any> & ArrayBufferView<ArrayBufferLike>
Inherited from
Section titled “Inherited from”$from(BufferView).get
staticset(this,buffer,offset,value):void
Defined in: node_modules/memium/dist/types.d.ts:19
Set a value in a buffer
Parameters
Section titled “Parameters”void
buffer
Section titled “buffer”ArrayBufferLike
offset
Section titled “offset”number
BufferView<any> & ArrayBufferView<ArrayBufferLike>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from(BufferView).set