home *** CD-ROM | disk | FTP | other *** search
-
-
- #ifndef FILDIR_H
- #define FILDIR_H
-
-
-
-
- #ifdef UNIX
-
- /* File attribute constants */
-
- #define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
- #define _A_RDONLY 0x01 /* Read only file */
- #define _A_HIDDEN 0x02 /* Hidden file */
- #define _A_SYSTEM 0x04 /* System file */
- #define _A_VOLID 0x08 /* Volume ID file */
- #define _A_SUBDIR 0x10 /* Subdirectory */
- #define _A_ARCH 0x20 /* Archive file */
-
-
-
- struct _find_t {
- char reserved[21];
- char attrib;
- unsigned wr_time;
- unsigned wr_date;
- long size;
- char name[13];
- };
-
-
- #define DIR_SYMBOLIC_LINK 17917 /* symbolic link value */
-
- #ifndef S_ISDIR
- #define S_ISDIR(m) (((m) &S_IFMT) == S_IFDIR)
- #define S_ISLNK(m) (((m) &S_IFMT) == S_IFLNK)
- #endif
-
- #define _lopen(a,b) open(a,b)
- #define _lread(a,b,c) read(a,b,c)
- #define _lwrite(a,b,c) write(a,b,c)
- #define _lclose(a) close(a)
- #define _lcreate(a,b) open(a,O_RDWR | O_CREAT)
-
- #endif
-
-
-
-
- #define DIR_ALL_FILES_STR "*.*"
-
-
- #ifdef UNIX
- #define DIR_SEPERATOR '/'
- #define DIR_SEPERATOR_STR "/"
- #else
- #define DIR_SEPERATOR '\\'
- #define DIR_SEPERATOR_STR "\\"
- #endif
-
- #define DIR_SELF_STR "."
- #define DIR_PARENT_STR ".."
-
-
-
- #define DIR_NO_DIRS 0x03 /* recursive processing, no more dirs */
- /* matches errno = 3 = ESRCH */
-
- #define DIR_FILE_NAME_LEN 64
-
-
-
- #define DIR_ALL_FILES 0x1
- #define DIR_SINGLE_FILE 0x00
-
-
-
- #endif
-
-