Stats
Defined in: src/node/stats.ts:305
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:221
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<StatsLike & InodeFields> = {}
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:306
Overrides
Section titled “Overrides”StatsCommon._isBigint
atimeMs
Section titled “atimeMs”atimeMs:
number
Defined in: src/node/stats.ts:116
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:179
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:101
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:158
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:206
Internal
Used by inodes
Inherited from
Section titled “Inherited from”StatsCommon.data
dev:
number
Defined in: src/node/stats.ts:81
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:211
Internal
Used by inodes
Inherited from
Section titled “Inherited from”StatsCommon.flags
gid:
number
Defined in: src/node/stats.ts:111
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:86
Inode number
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”StatsCommon.ino
mode:
number
Defined in: src/node/stats.ts:76
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:137
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:96
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:91
Device ID (if special file)
Implementation of
Section titled “Implementation of”Node.Stats.rdev
Inherited from
Section titled “Inherited from”StatsCommon.rdev
size:
number
Defined in: src/node/stats.ts:201
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”Inherited from
Section titled “Inherited from”StatsCommon.size
uid:
number
Defined in: src/node/stats.ts:106
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:216
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:118
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set atime(
value):void
Defined in: src/node/stats.ts:122
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:126
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set atimeInstant(
value):void
Defined in: src/node/stats.ts:130
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:281
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:181
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set birthtime(
value):void
Defined in: src/node/stats.ts:185
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:189
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set birthtimeInstant(
value):void
Defined in: src/node/stats.ts:193
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:293
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:67
Returns
Section titled “Returns”T
Set Signature
Section titled “Set Signature”set blocks(
value):void
Defined in: src/node/stats.ts:71
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:160
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set ctime(
value):void
Defined in: src/node/stats.ts:164
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:168
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set ctimeInstant(
value):void
Defined in: src/node/stats.ts:172
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:289
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:139
Returns
Section titled “Returns”Date
Set Signature
Section titled “Set Signature”set mtime(
value):void
Defined in: src/node/stats.ts:143
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:147
Returns
Section titled “Returns”Instant
Set Signature
Section titled “Set Signature”set mtimeInstant(
value):void
Defined in: src/node/stats.ts:151
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:285
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:63
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:277
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:255
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:259
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:243
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:263
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:239
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:251
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:247
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:267
Returns
Section titled “Returns”StatsLike<number> & InodeFields
Inherited from
Section titled “Inherited from”StatsCommon.toJSON