home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / perl / Source / H / Stat < prev    next >
Encoding:
Text File  |  1990-06-06  |  929 b   |  29 lines

  1. /* H.Stat: Header file for stat call (Specialised version for Perl) */
  2.  
  3. struct stat
  4. {
  5.         int        st_type;        /* file type (file/directory) */
  6.         int        st_ftype;       /* file type (-1 if unstamped) */
  7.         int        st_load;    /* load address */
  8.         int        st_exec;    /* execution address */
  9.         int        st_length;    /* file size in bytes */
  10.         int        st_attr;    /* file attributes */
  11.         double        st_time;        /* time stamp (0 if unstamped) */
  12.         time_t        st_utime;    /* time stamp in Unix format */
  13. };
  14.  
  15. /* File types */
  16.  
  17. #define T_FILE        1        /* Plain file */
  18. #define T_DIRECTORY    2        /* Directory */
  19.  
  20. /* File attribute bits */
  21.  
  22. #define S_READ        0x01        /* Read access for user */
  23. #define S_WRITE        0x02        /* Write access for user */
  24. #define S_LOCK        0x08        /* File is locked */
  25. #define S_PREAD        0x10        /* Public read access */
  26. #define S_PWRITE    0x20        /* Public write access */
  27.  
  28. extern int stat (char *name, struct stat *buf);
  29.