Stat.this

A constructor that creates an object of the Stat class with the given parameters. If called without parameters, then the default parameter for type, dev, atime, mtime, length is zero; default value for Perm and Qid parameter is standard initialized values for their (see Perm and Qid classes); the default parameter for name, uid, gid and muid is empty string.

class Stat
this
(
ushort type = 0
,
uint dev = 0
,
Qid qid = new Qid
,
Perm mode = new Perm
,
uint atime = 0
,
uint mtime = 0
,
ulong length = 0
,
string name = ""
,
string uid = ""
,
string gid = ""
,
string muid = ""
)

Parameters

type ushort

Major server version.

dev uint

Minor server version.

qid Qid

Unique server id for filesystem object.

atime uint

Last acess time (in Unix epoch format).

mtime uint

Last modification time (in Unix epoch format).

length ulong

Filesystem object size (in bytes).

name string

Filesystem object name.

uid string

Owner name.

gid string

Group of owner name.

muid string

Name of user, who modified file.

Typical usage:

    // chmod 775 (drwxrwxr-x)
		Perm perm = new Perm;
		perm.setPerm(
			STYX_FILE_PERMISSION.DMDIR | STYX_FILE_PERMISSION.OWNER_EXEC | STYX_FILE_PERMISSION.OWNER_READ | STYX_FILE_PERMISSION.OWNER_WRITE |
			STYX_FILE_PERMISSION.GROUP_READ | STYX_FILE_PERMISSION.GROUP_WRITE | STYX_FILE_PERMISSION.GROUP_EXEC | 
			STYX_FILE_PERMISSION.OTHER_READ | STYX_FILE_PERMISSION.OTHER_EXEC 
		);
			
		Stat stat = new Stat(
			// type and dev for kernel use (taken from some experiments with styxdecoder, see above)
			77, 4,
			new Qid,
			// permissions
			perm,
			// access time
			123456789,
			// modification time
			123456,
			// conventional length for all directories is 0
			0,
			// file name (this, directory name)
			"test",
			// user name (owner of file)
			"user",
			// user group name
			"users",
			// others group name
			""
		);

Meta