Files
wren/doc/site/modules/io/stat.markdown
T
Bob Nystrom f112722d00 feat: add File.stat() method and Stat class for filesystem metadata queries
Implement asynchronous stat() on File class returning a new Stat object with device, inode, mode, linkCount, user, group, specialDevice, size, blockSize, and blockCount fields populated from libuv uv_fs_stat callback. Register foreign method statPath_ in module registry, bump MAX_METHODS_PER_CLASS to 10, add Stat class to io.wren with indexed field accessors, update documentation index with Stat page, and include test coverage for stat on existing file and nonexistent path.
2016-01-01 17:58:44 +00:00

837 B

^title Stat Class

Contains the data returned by File.stat().

Methods

device

The ID of the device containing the entry.

inode

The inode number of the entry.

mode

A bit field describing the entry's type and protection flags.

linkCount

The number of hard links to the entry.

user

Numeric user ID of the file's owner.

group

Numeric group ID of the file's owner.

specialDevice

The device ID for the entry, if it's a special file.

size

The size of the entry in bytes.

blockSize

The preferred block size in bytes for interacting with the file. It may vary from file to file.

blockCount

The number of system blocks allocated on disk for the file.