home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / ThinkCPosix 1.1 / sys⁄stat.h < prev    next >
Encoding:
Text File  |  1993-02-21  |  1.2 KB  |  55 lines  |  [TEXT/KAHL]

  1. /* $Id: $ */
  2.  
  3. /* Include file belonging to stat emulator.
  4.    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). */
  5.  
  6. #pragma once
  7.  
  8. struct stat {
  9.     unsigned short st_dev;
  10.     unsigned short st_ino;
  11.     unsigned short st_mode;
  12.     unsigned short st_nlink;
  13.     unsigned int   st_uid;
  14.     unsigned int   st_gid;
  15.     unsigned short st_rdev;
  16.     unsigned long st_size;
  17.     unsigned long st_rsize; /* Resource size -- nonstandard */
  18.     unsigned long st_atime;
  19.     unsigned long st_mtime;
  20.     unsigned long st_ctime;
  21.     FInfo st_FlFndrInfo;        /* File type, creator, etc */
  22. };
  23.  
  24. /* from Borland-C
  25. struct  stat
  26. {
  27.     short st_dev;
  28.     short st_ino;
  29.     short st_mode;
  30.     short st_nlink;
  31.     int   st_uid;
  32.     int   st_gid;
  33.     short st_rdev;
  34.     long  st_size;
  35.     long  st_atime;
  36.     long  st_mtime;
  37.     long  st_ctime;
  38. };
  39. */
  40.  
  41. int fstat (int __handle, struct stat *__statbuf);
  42. int stat  (char *__path, struct stat *__statbuf);
  43.  
  44.  
  45. #define S_IFMT    0170000L
  46. #define S_IFDIR    0040000L
  47. #define S_IFREG 0100000L
  48. #define S_IREAD    0400
  49. #define S_IWRITE   0200
  50. #define S_IEXEC    0100
  51.  
  52. #define S_IFIFO 010000  /* FIFO special */
  53. #define S_IFCHR 020000  /* character special */
  54. #define S_IFBLK 030000  /* block special */
  55.