Stat (system Call) - Stat Structure

Stat Structure

The struct stat structure, also defined in , includes at least the following members:

st_dev
Identifier of device containing file
st_ino
Inode number
st_mode
Protection mode. See also Unix permissions.
st_nlink
Reference count of hard links
st_uid
User identifier of owner
st_gid
Group identifier of owner
st_rdev
Device identifier (if special file)
st_size
Total file size, in bytes
st_atime
Time of last access
st_mtime
Time of last modification
st_ctime
Time of last status change
st_blksize
Block size for filesystem I/O
st_blocks
Number of blocks allocated

The st_mode field is a bit field. It combines the file access modes and also indicates any special file type. There are many macros to work with the different mode flags and file types.

Read more about this topic:  Stat (system Call)

Famous quotes containing the word structure:

    Vashtar: So it’s finished. A structure to house one man and the greatest treasure of all time.
    Senta: And a structure that will last for all time.
    Vashtar: Only history will tell that.
    Senta: Sire, will he not be remembered?
    Vashtar: Yes, he’ll be remembered. The pyramid’ll keep his memory alive. In that he built better than he knew.
    William Faulkner (1897–1962)