stat.h 861 B

1234567891011121314151617181920212223242526
  1. struct stat {
  2. short int st_dev;
  3. unsigned short st_ino;
  4. unsigned short st_mode;
  5. short int st_nlink;
  6. short int st_uid;
  7. short int st_gid;
  8. short int st_rdev;
  9. long st_size;
  10. long st_atime;
  11. long st_mtime;
  12. long st_ctime;
  13. };
  14. /* Some common definitions. */
  15. #define S_IFMT 0170000 /* type of file */
  16. #define S_IFDIR 0040000 /* directory */
  17. #define S_IFCHR 0020000 /* character special */
  18. #define S_IFBLK 0060000 /* block special */
  19. #define S_IFREG 0100000 /* regular */
  20. #define S_ISUID 04000 /* set user id on execution */
  21. #define S_ISGID 02000 /* set group id on execution */
  22. #define S_ISVTX 01000 /* save swapped text even after use */
  23. #define S_IREAD 00400 /* read permission, owner */
  24. #define S_IWRITE 00200 /* write permission, owner */
  25. #define S_IEXEC 00100 /* execute/search permission, owner */