home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / text_cla / fildir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-12  |  1.4 KB  |  81 lines

  1.  
  2.  
  3. #ifndef FILDIR_H
  4. #define FILDIR_H
  5.  
  6.  
  7.  
  8.  
  9. #ifdef UNIX
  10.  
  11. /* File attribute constants */
  12.  
  13. #define _A_NORMAL    0x00    /* Normal file - No read/write restrictions */
  14. #define _A_RDONLY    0x01    /* Read only file */
  15. #define _A_HIDDEN    0x02    /* Hidden file */
  16. #define _A_SYSTEM    0x04    /* System file */
  17. #define _A_VOLID    0x08    /* Volume ID file */
  18. #define _A_SUBDIR    0x10    /* Subdirectory */
  19. #define _A_ARCH     0x20    /* Archive file */
  20.  
  21.  
  22.  
  23. struct _find_t {
  24.     char reserved[21];
  25.     char attrib;
  26.     unsigned wr_time;
  27.     unsigned wr_date;
  28.     long size;
  29.     char name[13];
  30.     };
  31.  
  32.  
  33. #define DIR_SYMBOLIC_LINK 17917    /* symbolic link value */
  34.  
  35. #ifndef S_ISDIR
  36. #define S_ISDIR(m) (((m) &S_IFMT) == S_IFDIR)
  37. #define S_ISLNK(m) (((m) &S_IFMT) == S_IFLNK)
  38. #endif
  39.  
  40. #define _lopen(a,b)     open(a,b)
  41. #define _lread(a,b,c)   read(a,b,c)
  42. #define _lwrite(a,b,c)  write(a,b,c)
  43. #define _lclose(a)      close(a)
  44. #define _lcreate(a,b)   open(a,O_RDWR | O_CREAT)
  45.  
  46. #endif
  47.  
  48.  
  49.  
  50.  
  51. #define DIR_ALL_FILES_STR "*.*"
  52.  
  53.  
  54. #ifdef UNIX
  55. #define DIR_SEPERATOR       '/'
  56. #define DIR_SEPERATOR_STR "/"
  57. #else
  58. #define DIR_SEPERATOR       '\\'
  59. #define DIR_SEPERATOR_STR "\\"
  60. #endif
  61.  
  62. #define DIR_SELF_STR  "."
  63. #define DIR_PARENT_STR ".."
  64.  
  65.  
  66.  
  67. #define DIR_NO_DIRS   0x03    /* recursive processing, no more dirs */
  68.                               /* matches errno = 3 = ESRCH */
  69.  
  70. #define DIR_FILE_NAME_LEN 64
  71.  
  72.  
  73.  
  74. #define DIR_ALL_FILES  0x1
  75. #define DIR_SINGLE_FILE 0x00
  76.  
  77.  
  78.  
  79. #endif
  80.  
  81.