2 * direct.h Defines the types and structures used by the directory routines
17 #include <sys/types.h>
20 #define INCL_DOSFILEMGR
21 #define INCL_DOSERRORS
25 #define NAME_MAX 255 /* maximum filename for HPFS or NTFS */
27 typedef struct dirent
{
29 ULONG d_attr
; /* file's attribute */
30 unsigned short int d_time
; /* file's time */
31 unsigned short int d_date
; /* file's date */
32 ULONG d_size
; /* file's size */
33 char d_name
[ NAME_MAX
+ 1 ]; /* file's name */
34 unsigned short d_ino
; /* serial number (not used) */
35 char d_first
; /* flag for 1st time */
39 #define _A_NORMAL 0x00 /* Normal file - read/write permitted */
40 #define _A_RDONLY 0x01 /* Read-only file */
41 #define _A_HIDDEN 0x02 /* Hidden file */
42 #define _A_SYSTEM 0x04 /* System file */
43 #define _A_VOLID 0x08 /* Volume-ID entry */
44 #define _A_SUBDIR 0x10 /* Subdirectory */
45 #define _A_ARCH 0x20 /* Archive file */
48 extern int closedir( DIR * );
50 extern char *getcwd( char *__buf, unsigned __size );
51 extern unsigned _getdrive( void );
52 extern unsigned _getdiskfree( unsigned __drive, struct _diskfree_t *__diskspace);
54 extern DIR *opendir( const char * );
55 extern struct dirent
*readdir( DIR * );
57 extern int chdir( const char *__path
);
58 extern int mkdir( const char *__path
);
59 extern int rmdir( const char *__path
);