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