home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / emxdev8f.zip / DIR.H < prev    next >
C/C++ Source or Header  |  1992-11-18  |  2KB  |  71 lines

  1. /* sys/dir.h (emx+gcc) */
  2.  
  3. #if !defined (_SYS_DIR_H)
  4. #define _SYS_DIR_H
  5.  
  6. #if defined (__cplusplus)
  7. extern "C" {
  8. #endif
  9.  
  10. #if !defined (MAXNAMLEN)
  11. #define MAXNAMLEN  260
  12. #endif
  13.  
  14. #if !defined (MAXPATHLEN)
  15. #define MAXPATHLEN 260
  16. #endif
  17.  
  18. #if !defined (A_RONLY)
  19. #define A_RONLY   0x01
  20. #define A_HIDDEN  0x02
  21. #define A_SYSTEM  0x04
  22. #define A_LABEL   0x08
  23. #define A_DIR     0x10
  24. #define A_ARCHIVE 0x20
  25. #endif
  26.  
  27. struct direct
  28. {
  29.   ino_t          d_ino;                 /* Almost not used           */
  30.   int            d_reclen;              /* Almost not used           */
  31.   int            d_namlen;              /* Length of d_name          */
  32.   char           d_name[MAXNAMLEN + 1]; /* File name, 0 terminated   */
  33.   long           d_size;                /* File size (bytes)         */
  34.   unsigned short d_mode;                /* OS file attributes        */
  35.   unsigned short d_time;                /* OS file modification time */
  36.   unsigned short d_date;                /* OS file modification date */
  37. };
  38.  
  39. struct _dircontents
  40. {
  41.   char *                _d_entry;
  42.   long                  _d_size;
  43.   unsigned short        _d_mode;
  44.   unsigned short        _d_time;
  45.   unsigned short        _d_date;
  46.   struct _dircontents * _d_next;
  47. };
  48.  
  49. struct _dirdesc
  50. {
  51.   int                   dd_id;
  52.   long                  dd_loc;
  53.   struct _dircontents * dd_contents;
  54.   struct _dircontents * dd_cp;
  55. };
  56.  
  57. typedef struct _dirdesc DIR;
  58.  
  59. DIR *opendir (__const__ char *name);
  60. struct direct *readdir (DIR *dirp);
  61. void seekdir (DIR *dirp, long off);
  62. long telldir (DIR *dirp);
  63. int closedir (DIR *dirp);
  64. void rewinddir (DIR *dirp);
  65.  
  66. #if defined (__cplusplus)
  67. }
  68. #endif
  69.  
  70. #endif /* !defined (SYS_DIR_H) */
  71.