stat.h 623 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __GBLIBC_SYS_STAT_H
  2. #define __GBLIBC_SYS_STAT_H
  3. #include <bits/alltypes.h>
  4. #include <sys/types.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. struct stat {
  9. dev_t st_dev;
  10. ino_t st_ino;
  11. mode_t st_mode;
  12. uint16_t st_nlink;
  13. uint16_t st_uid;
  14. uint16_t st_gid;
  15. dev_t st_rdev;
  16. off_t st_size;
  17. blksize_t st_blksize;
  18. blkcnt_t st_blocks;
  19. struct timespec st_atim;
  20. struct timespec st_mtim;
  21. struct timespec st_ctim;
  22. };
  23. int stat(const char* pathname, struct stat* statbuf);
  24. int fstat(int fd, struct stat* statbuf);
  25. mode_t umask(mode_t mask);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif