06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pHILE+ <strong>System</strong> <strong>Calls</strong> fstat_f<br />

fstat_f Obtains the status of a file specified by its file identifier.<br />

#include <br />

unsigned long fstat_f(<br />

unsigned long fid, /* file identifier */<br />

struct stat *buf /* file status */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

All volume types.<br />

fstat_f() functions the same as stat_f() except that fstat_f() obtains<br />

information about a file by using the file identifier instead of the name. The file<br />

identifier is first obtained with either open_f() or open_fn().<br />

fid Specifies the file identifier associated with the file.<br />

buf Points to a stat structure defined in , as follows:<br />

struct stat {<br />

mode_t st_mode; /* ownership/protection */<br />

ino_t st_ino; /* file ID */<br />

dev_t st_dev; /* device ID where the volume resides */<br />

dev_t st_rdev; /* device ID, for character or<br />

* block special files only */<br />

nlink_t st_nlink; /* number of hard links to the file */<br />

uid_t st_uid; /* user ID */<br />

gid_t st_gid; /* group ID */<br />

off_t st_size; /* total size of file, in bytes */<br />

time_t st_atime; /* file last access time */<br />

time_t st_mtime; /* file last modify time */<br />

time_t st_ctime; /* file last status change time */<br />

long st_blksize; /* optimal block size for I/O ops */<br />

long st_blocks; /* file size in blocks */<br />

};<br />

This structure cannot be packed. mode_t, ino_t, dev_t, nlink_t,<br />

uid_t, gid_t, off_t, and time_t are defined as unsigned long in<br />

.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 2-35<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!