# fs.Stats

> A `fs.Stats` object provides information about a file.

- Source: https://titaniumsdk.com/docs/sdk/12.6.4/fs.Stats
- Titanium SDK version: 12.6.4
- Kind: pseudo
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 8.3.0

## Properties

### atime

- Type: Date
- Platforms: Android, iPhone, iPad, macOS

The timestamp indicating the last time this file was accessed.

### atimeMs

- Type: Number
- Platforms: Android, iPhone, iPad, macOS

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

### birthtime

- Type: Date
- Platforms: Android, iPhone, iPad, macOS

The timestamp indicating the creation time of this file.

### birthtimeMs

- Type: Number
- Platforms: Android, iPhone, iPad, macOS

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

### blksize

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `4096`

The file system block size for i/o operations.

Hard-coded to `4096` on Titanium right now.

### blocks

- Type: Number
- Platforms: Android, iPhone, iPad, macOS

The number of blocks allocated for this file.

### ctime

- Type: Date
- Platforms: Android, iPhone, iPad, macOS

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

### ctimeMs

- Type: Number
- Platforms: Android, iPhone, iPad, macOS

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

### dev

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

The numeric identifier of the device containing the file.

Always returns `0` on Titanium.

### gid

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

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

Always returns `0` on Titanium.

### ino

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

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

Always returns `0` on Titanium.

### mode

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

A bit-field describing the file type and mode.

Always returns `0` on Titanium.

### mtime

- Type: Date
- Platforms: Android, iPhone, iPad, macOS

The timestamp indicating the last time this file was modified.

### mtimeMs

- Type: Number
- Platforms: Android, iPhone, iPad, macOS

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

### nlink

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

The number of hard-links that exist for the file.

Always returns `0` on Titanium.

### rdev

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

A numeric device identifier if the file represents a device.

Always returns `0` on Titanium.

### size

- Type: Number
- Platforms: Android, iPhone, iPad, macOS

The size of the file in bytes.

### uid

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Value: `0`

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

Always returns `0` on Titanium.

## Methods

### isBlockDevice

- Platforms: Android, iPhone, iPad, macOS

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

Returns: Boolean

### isCharacterDevice

- Platforms: Android, iPhone, iPad, macOS

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

Returns: Boolean

### isDirectory

- Platforms: Android, iPhone, iPad, macOS

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

### isFIFO

- Platforms: Android, iPhone, iPad, macOS

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

Returns: Boolean

### isFile

- Platforms: Android, iPhone, iPad, macOS

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

Returns: Boolean

### isSocket

- Platforms: Android, iPhone, iPad, macOS

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

Returns: Boolean

### isSymbolicLink

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `fs.Stats` object describes a symbolic link.

This method is only valid when using `fs.lstat()`.

Returns: Boolean

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

