Stats
Defined in: src/node/stats.ts:213
Implementation of Node’s Stats.
Attribute descriptions are from `man 2 stat’
Extends
Section titled “Extends”StatsCommon<number>
Implements
Section titled “Implements”StatsStatsLike
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Stats(
__namedParameters?):Stats
Defined in: src/node/stats.ts:129
Creates a new stats instance from a stats-like object. Can be used to copy stats (note)
Parameters
Section titled “Parameters”__namedParameters?
Section titled “__namedParameters?”Partial<InodeLike<number | bigint>> = {}
Returns
Section titled “Returns”Stats
Inherited from
Section titled “Inherited from”StatsCommon<number>.constructor
Properties
Section titled “Properties”_isBigint
Section titled “_isBigint”
protected_isBigint:false
Defined in: src/node/stats.ts:214
Overrides
Section titled “Overrides”StatsCommon._isBigint
atimeMs
Section titled “atimeMs”atimeMs:
number
Defined in: src/node/stats.ts:53
Time of last access, since epoch
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.atimeMs
birthtimeMs
Section titled “birthtimeMs”birthtimeMs:
number
Defined in: src/node/stats.ts:102
Time of file creation, since epoch
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.birthtimeMs
blksize
Section titled “blksize”blksize:
number
Defined in: src/node/stats.ts:47
Block size for file system I/O
Implementation of
Section titled “Implementation of”Node.Stats.blksize
Inherited from
Section titled “Inherited from”StatsCommon.blksize
ctimeMs
Section titled “ctimeMs”ctimeMs:
number
Defined in: src/node/stats.ts:87
Time of last time file status was changed, since epoch
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.ctimeMs
optionaldata?:number
Defined in: src/node/stats.ts:120
Internal
Used by inodes
Inherited from
Section titled “Inherited from”StatsCommon.data
dev:
number
Defined in: src/node/stats.ts:39
ID of device containing file
Implementation of
Section titled “Implementation of”Node.Stats.dev
Inherited from
Section titled “Inherited from”StatsCommon.dev
flags?
Section titled “flags?”
optionalflags?:number
Defined in: src/node/stats.ts:123
Internal
Used by inodes
Inherited from
Section titled “Inherited from”StatsCommon.flags
gid:
number
Defined in: src/node/stats.ts:51
Group ID of owner
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.gid
ino:
number
Defined in: src/node/stats.ts:41
Inode number
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.ino
mode:
number
Defined in: src/node/stats.ts:37
Unix-style file mode (e.g. 0o644) that includes the type of the item.
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.mode
mtimeMs
Section titled “mtimeMs”mtimeMs:
number
Defined in: src/node/stats.ts:72
Time of last modification, since epoch
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.mtimeMs
nlink:
number
Defined in: src/node/stats.ts:45
Number of hard links
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.nlink
rdev:
number
Defined in: src/node/stats.ts:43
Device ID (if special file)
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.rdev
size:
number
Defined in: src/node/stats.ts:117
Size of the item in bytes. For directories/symlinks, this may be the size of the struct that represents the item.
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.size
uid:
number
Defined in: src/node/stats.ts:49
User ID of owner
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.uid
version?
Section titled “version?”
optionalversion?:number
Defined in: src/node/stats.ts:126
Internal
Used by inodes
Inherited from
Section titled “Inherited from”StatsCommon.version
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get atime():
Date
Defined in: src/node/stats.ts:55
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set atime(
value):void
Defined in: src/node/stats.ts:59
Parameters
Section titled “Parameters”Date
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.atime
Inherited from
Section titled “Inherited from”StatsCommon.atime
atimeInstant
Section titled “atimeInstant”Get Signature
Section titled “Get Signature”get atimeInstant():
Instant
Defined in: src/node/stats.ts:63
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set atimeInstant(
value):void
Defined in: src/node/stats.ts:67
Parameters
Section titled “Parameters”Instant
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.atimeInstant
Inherited from
Section titled “Inherited from”StatsCommon.atimeInstant
atimeNs
Section titled “atimeNs”Get Signature
Section titled “Get Signature”get atimeNs():
bigint
Defined in: src/node/stats.ts:189
Returns
Section titled “Returns”bigint
Inherited from
Section titled “Inherited from”StatsCommon.atimeNs
birthtime
Section titled “birthtime”Get Signature
Section titled “Get Signature”get birthtime():
Date
Defined in: src/node/stats.ts:103
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set birthtime(
value):void
Defined in: src/node/stats.ts:106
Parameters
Section titled “Parameters”Date
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.birthtime
Inherited from
Section titled “Inherited from”StatsCommon.birthtime
birthtimeInstant
Section titled “birthtimeInstant”Get Signature
Section titled “Get Signature”get birthtimeInstant():
Instant
Defined in: src/node/stats.ts:109
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set birthtimeInstant(
value):void
Defined in: src/node/stats.ts:112
Parameters
Section titled “Parameters”Instant
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.birthtimeInstant
Inherited from
Section titled “Inherited from”StatsCommon.birthtimeInstant
birthtimeNs
Section titled “birthtimeNs”Get Signature
Section titled “Get Signature”get birthtimeNs():
bigint
Defined in: src/node/stats.ts:201
Returns
Section titled “Returns”bigint
Inherited from
Section titled “Inherited from”StatsCommon.birthtimeNs
blocks
Section titled “blocks”Get Signature
Section titled “Get Signature”get blocks():
T
Defined in: src/node/stats.ts:30
Returns
Section titled “Returns”T
Set Signature
Section titled “Set Signature”set blocks(
value):void
Defined in: src/node/stats.ts:34
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.blocks
Inherited from
Section titled “Inherited from”StatsCommon.blocks
Get Signature
Section titled “Get Signature”get ctime():
Date
Defined in: src/node/stats.ts:88
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set ctime(
value):void
Defined in: src/node/stats.ts:91
Parameters
Section titled “Parameters”Date
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.ctime
Inherited from
Section titled “Inherited from”StatsCommon.ctime
ctimeInstant
Section titled “ctimeInstant”Get Signature
Section titled “Get Signature”get ctimeInstant():
Instant
Defined in: src/node/stats.ts:94
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set ctimeInstant(
value):void
Defined in: src/node/stats.ts:97
Parameters
Section titled “Parameters”Instant
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.ctimeInstant
Inherited from
Section titled “Inherited from”StatsCommon.ctimeInstant
ctimeNs
Section titled “ctimeNs”Get Signature
Section titled “Get Signature”get ctimeNs():
bigint
Defined in: src/node/stats.ts:197
Returns
Section titled “Returns”bigint
Inherited from
Section titled “Inherited from”StatsCommon.ctimeNs
Get Signature
Section titled “Get Signature”get mtime():
Date
Defined in: src/node/stats.ts:73
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set mtime(
value):void
Defined in: src/node/stats.ts:76
Parameters
Section titled “Parameters”Date
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.mtime
Inherited from
Section titled “Inherited from”StatsCommon.mtime
mtimeInstant
Section titled “mtimeInstant”Get Signature
Section titled “Get Signature”get mtimeInstant():
Instant
Defined in: src/node/stats.ts:79
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set mtimeInstant(
value):void
Defined in: src/node/stats.ts:82
Parameters
Section titled “Parameters”Instant
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Node.Stats.mtimeInstant
Inherited from
Section titled “Inherited from”StatsCommon.mtimeInstant
mtimeNs
Section titled “mtimeNs”Get Signature
Section titled “Get Signature”get mtimeNs():
bigint
Defined in: src/node/stats.ts:193
Returns
Section titled “Returns”bigint
Inherited from
Section titled “Inherited from”StatsCommon.mtimeNs
Methods
Section titled “Methods”_convert()
Section titled “_convert()”
protected_convert(arg):number
Defined in: src/node/stats.ts:26
Parameters
Section titled “Parameters”string | number | bigint | boolean
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”StatsCommon._convert
hasAccess()
Section titled “hasAccess()”hasAccess(
mode,context?):boolean
Defined in: src/node/stats.ts:185
Internal
Checks if a given user/group has access to this item
Parameters
Section titled “Parameters”number
The requested access, combination of W_OK, R_OK, and X_OK
context?
Section titled “context?”unknown
Returns
Section titled “Returns”boolean
True if the request has access, false if the request does not
Inherited from
Section titled “Inherited from”StatsCommon.hasAccess
isBlockDevice()
Section titled “isBlockDevice()”isBlockDevice():
boolean
Defined in: src/node/stats.ts:163
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isBlockDevice
Inherited from
Section titled “Inherited from”StatsCommon.isBlockDevice
isCharacterDevice()
Section titled “isCharacterDevice()”isCharacterDevice():
boolean
Defined in: src/node/stats.ts:167
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isCharacterDevice
Inherited from
Section titled “Inherited from”StatsCommon.isCharacterDevice
isDirectory()
Section titled “isDirectory()”isDirectory():
boolean
Defined in: src/node/stats.ts:151
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isDirectory
Inherited from
Section titled “Inherited from”StatsCommon.isDirectory
isFIFO()
Section titled “isFIFO()”isFIFO():
boolean
Defined in: src/node/stats.ts:171
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isFIFO
Inherited from
Section titled “Inherited from”StatsCommon.isFIFO
isFile()
Section titled “isFile()”isFile():
boolean
Defined in: src/node/stats.ts:147
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isFile
Inherited from
Section titled “Inherited from”StatsCommon.isFile
isSocket()
Section titled “isSocket()”isSocket():
boolean
Defined in: src/node/stats.ts:159
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isSocket
Inherited from
Section titled “Inherited from”StatsCommon.isSocket
isSymbolicLink()
Section titled “isSymbolicLink()”isSymbolicLink():
boolean
Defined in: src/node/stats.ts:155
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”Node.Stats.isSymbolicLink
Inherited from
Section titled “Inherited from”StatsCommon.isSymbolicLink
toJSON()
Section titled “toJSON()”toJSON():
StatsLike<number> &InodeFields
Defined in: src/node/stats.ts:175
Returns
Section titled “Returns”StatsLike<number> & InodeFields
Inherited from
Section titled “Inherited from”StatsCommon.toJSON