struct FileStat

A structure for storing and retrieving file information on Linux.

uint mask

Mask of bits indicating filled fields.

uint blksize

Block size for filesystem I/O.

ulong attributes

Extra file attribute indicators.

uint nlink

Number of hard links.

uint uid

User ID of owner.

uint gid

Group ID of owner.

ushort mode

File type and mode.

ulong ino

Inode number.

ulong size

Total size in bytes.

ulong blocks

Number of 512B blocks allocated.

ulong attributes_mask

Mask to show what's supported in stx_attributes.

timestamp_t atime

Time of last access.

timestamp_t btime

Time of creation.

timestamp_t mtime

Time of last modification.

timestamp_t ctime

Time of last status change.

ulong rdev

Device ID (if this file is a device).

uint rdev_major

Device major id (if this file is a device).

uint rdev_minor

Device minor id (if this file is a device).

ulong dev

ID of device containing file.

uint dev_major

Major ID of the filesystem where the file resides.

uint dev_minor

Minor ID of the filesystem where the file resides.

string filepath

File path.

uint fieldMask

Stored mask for required structure fields.

this(string filepath, uint fieldMask = STATX_DEFAULT)

The constructor creates object with file information by file path.

Parameters

filepath

The path to the file being examined.

fieldMask

Used to tell the kernel which fields the caller is interested in.

void update()

This method re-reads and updates file information.

@property
string user()

Gets user name of owner.

@property
string group()

Gets group name of owner.

@property
const FileType type()

Returns file type.

Variables

mask

Mask of bits indicating filled fields.

blksize

Block size for filesystem I/O.

attributes

Extra file attribute indicators.

nlink

Number of hard links.

uid

User ID of owner.

gid

Group ID of owner.

mode

File type and mode.

ino

Inode number.

size

Total size in bytes.

blocks

Number of 512B blocks allocated.

attributes_mask

Mask to show what's supported in stx_attributes.

atime

Time of last access.

btime

Time of creation.

mtime

Time of last modification.

ctime

Time of last status change.

rdev

Device ID (if this file is a device).

rdev_major

Device major id (if this file is a device).

rdev_minor

Device minor id (if this file is a device).

dev

ID of device containing file.

dev_major

Major ID of the filesystem where the file resides.

dev_minor

Minor ID of the filesystem where the file resides.

filepath

File path.

fieldMask

Stored mask for required structure fields.

Methods

this
update
user
group
type