home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c063 / 1.ddi / INCLUDE.ZIP / STAT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-18  |  1.1 KB  |  51 lines

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