# fs.Stats
A fs.Stats
object provides information about a file.
NOTE
This is an abstract type. Any object of this structure can be used where this type is used.
# Properties
# atimeMs
The timestamp indicating the last time this file was accessed expressed in milliseconds since the POSIX Epoch.
# birthtimeMs
The timestamp indicating the creation time of this file expressed in milliseconds since the POSIX Epoch.
# blksize
The file system block size for i/o operations.
Hard-coded to 4096
on Titanium right now.
# ctimeMs
The timestamp indicating the last time the file status was changed expressed in milliseconds since the POSIX Epoch.
# dev
The numeric identifier of the device containing the file.
Always returns 0
on Titanium.
# gid
The numeric group identifier of the group that owns the file (POSIX).
Always returns 0
on Titanium.
# ino
The file system specific "Inode" number for the file.
Always returns 0
on Titanium.
# mtimeMs
The timestamp indicating the last time this file was modified expressed in milliseconds since the POSIX Epoch.
# nlink
The number of hard-links that exist for the file.
Always returns 0
on Titanium.
# rdev
A numeric device identifier if the file represents a device.
Always returns 0
on Titanium.
# uid
The numeric user identifier of the user that owns the file (POSIX).
Always returns 0
on Titanium.
# Methods
# isBlockDevice
Returns true
if the fs.Stats
object describes a block device.
Returns
- Type
- Boolean
# isCharacterDevice
Returns true
if the fs.Stats
object describes a character device.
Returns
- Type
- Boolean
# isDirectory
Returns true
if the fs.Stats
object describes a file system directory.
If the fs.Stats
object was obtained from fs.lstat()
, this method will always return false
.
This is because fs.lstat()
returns information about a symbolic link itself and not the path it resolves to.
Returns
- Type
- Boolean
# isFIFO
Returns true
if the fs.Stats
object describes a first-in-first-out (FIFO) pipe.
Returns
- Type
- Boolean
# isFile
Returns true
if the fs.Stats
object describes a regular file.
Returns
- Type
- Boolean
# isSocket
Returns true
if the fs.Stats
object describes a socket.
Returns
- Type
- Boolean
# isSymbolicLink
Returns true
if the fs.Stats
object describes a symbolic link.
This method is only valid when using fs.lstat()
.
Returns
- Type
- Boolean