| United States-English |
|
|
|
![]() |
HP-UX 11i Version 1.5 Reference Volume 6, Section 5: Miscellaneous Topics > sstat(5) |
|
NAMEstat.h — data returned by the stat() function DESCRIPTIONThe <sys/stat.h> header defines the structure of the data returned by the functions fstat(), lstat(), and stat(). The structure stat contains at least the following members:
File serial number and device ID taken together uniquely identify the file within the system. The dev_t, ino_t, mode_t, nlink_t, uid_t, gid_t, off_t, and time_t types are defined as described in <sys/types.h>. Times are given in seconds since the Epoch. The following symbolic names for the values of st_mode are also defined: File type:
File mode bits:
The bits defined by S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGlD and S_ISVTX are unique. S_IRWXU is the bitwise OR of S_IRUSR, S_IWUSR, and S_IXUSR. S_IRWXG is the bitwise OR of S_IRGRP, S_IWGRP, and S_IXGRP. S_IRWXO is the bitwise OR of S_IROTH, S_IWOTH, and S_IXOTH. Implementations may OR other implementation-dependent bits into S_IRWXU, S_IRWXG, and S_IRWXO, but they will not overlap any of the other bits defined in this document. The file permission bits are defined to be those corresponding to the bitwise inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO. The following macros will test whether a file is of the specified type. The value m supplied to the macros is the value of st_mode from a stat structure. The macro evaluates to a non-zero value if the test is true, 0 if the test is false.
The following are declared as functions and may also be defined as macros: int chmod(const char *path, mode_t mode); int lstat(const char *path, struct stat *buf); int mkdir(const char *path, mode_t mode); int mkfifo(const char *path, mode_t mode); int mknod(const char *path, mode_t mode, dev_t dev); int stat(const char *path, struct stat *buf); mode_t umask(mode_t cmask); SEE ALSOchmod(2), fstat(2), lstat(2), mkdir(2), mkfifo(3C), mknod(2), stat(2), umask(2), <sys/types.h>. Issue 4The following changes are incorporated for alignment with the ISO POSIX-1 standard:
Other changes are incorporated as follows:
Issue 4, Version 2The following changes are incorporated for X\/OPEN UNIX conformance:
DESCRIPTIONThe stat structure includes the following members: ushort st_fstype; /*Type of filesystem this file */ /* is in; see vfsmount(2) */ dev_t st_realdev; /* Real device number of device */ /* containing the inode for this file */ The following symbolic names for the values of the st_mode field are defined as indicated: File type:
File mode bits:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||