home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c021 / 7.img / INCLUDE.ZIP / STAT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-04  |  1.2 KB  |  58 lines

  1. /*    stat.h
  2.  
  3.     Definitions used for file status functions
  4.  
  5.         Copyright (c) Borland International 1987,1988,1990
  6.     All Rights Reserved.
  7. */
  8. #if __STDC__
  9. #define _Cdecl
  10. #else
  11. #define _Cdecl    cdecl
  12. #endif
  13.  
  14. #ifndef __PAS__
  15. #define _CType _Cdecl
  16. #else
  17. #define _CType pascal
  18. #endif
  19.  
  20. #ifndef _STAT_H
  21. #define _STAT_H 1
  22.  
  23. #define S_IFMT    0xF000    /* file type mask */
  24. #define S_IFDIR    0x4000    /* directory */
  25. #define S_IFIFO    0x1000    /* FIFO special */
  26. #define S_IFCHR    0x2000    /* character special */
  27. #define S_IFBLK    0x3000    /* block special */
  28. #define S_IFREG    0x8000    /* or just 0x0000, regular */
  29. #define S_IREAD    0x0100    /* owner may read */
  30. #define S_IWRITE 0x0080    /* owner may write */
  31. #define S_IEXEC    0x0040    /* owner may execute <directory search> */
  32.  
  33. struct    stat
  34. {
  35.     short st_dev;
  36.     short st_ino;
  37.     short st_mode;
  38.     short st_nlink;
  39.     int   st_uid;
  40.     int   st_gid;
  41.     short st_rdev;
  42.     long  st_size;
  43.     long  st_atime;
  44.     long  st_mtime;
  45.     long  st_ctime;
  46. };
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51. int  _Cdecl fstat (int __handle, struct stat *__statbuf);
  52. int  _Cdecl stat  (char *__path, struct stat *__statbuf);
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56.  
  57. #endif    /* _STAT_H */
  58.