home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / STAT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  1.3 KB  |  65 lines

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