Skip to content
Titanium SDK
Version13.2.0

You are reading 13.2.0. See this page in 13.4.1.

fs.Stats

pseudoAndroidiPhoneiPadmacOSsince 8.3.0

A fs.Stats object provides information about a file.

Properties 18

atime

Date

The timestamp indicating the last time this file was accessed.

atimeMs

Number

The timestamp indicating the last time this file was accessed expressed in milliseconds since the POSIX Epoch.

The timestamp indicating the creation time of this file.

The timestamp indicating the creation time of this file expressed in milliseconds since the POSIX Epoch.

blksize

Number

The file system block size for i/o operations.

Hard-coded to 4096 on Titanium right now.

Value 4096

blocks

Number

The number of blocks allocated for this file.

ctime

Date

The timestamp indicating the last time the file status was changed.

ctimeMs

Number

The timestamp indicating the last time the file status was changed expressed in milliseconds since the POSIX Epoch.

dev

Number

The numeric identifier of the device containing the file.

Always returns 0 on Titanium.

Value 0

gid

Number

The numeric group identifier of the group that owns the file (POSIX).

Always returns 0 on Titanium.

Value 0

ino

Number

The file system specific "Inode" number for the file.

Always returns 0 on Titanium.

Value 0

mode

Number

A bit-field describing the file type and mode.

Always returns 0 on Titanium.

Value 0

mtime

Date

The timestamp indicating the last time this file was modified.

mtimeMs

Number

The timestamp indicating the last time this file was modified expressed in milliseconds since the POSIX Epoch.

rdev

Number

A numeric device identifier if the file represents a device.

Always returns 0 on Titanium.

Value 0

size

Number

The size of the file in bytes.

uid

Number

The numeric user identifier of the user that owns the file (POSIX).

Always returns 0 on Titanium.

Value 0

Methods 7

Returns true if the fs.Stats object describes a block device.

Returns Boolean

Returns true if the fs.Stats object describes a character device.

Returns Boolean

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 Boolean

Returns true if the fs.Stats object describes a first-in-first-out (FIFO) pipe.

Returns Boolean

Returns true if the fs.Stats object describes a regular file.

Returns Boolean

Returns true if the fs.Stats object describes a socket.

Returns Boolean