update
[midnight-commander.git] / os2 / dirent.h
blob6ae9a0e77461e9cce8f6c3b472ec8c79c8751e8f
1 /*
2 * direct.h Defines the types and structures used by the directory routines
4 */
5 #ifndef _DIRENT_H_incl
6 #define _DIRENT_H_incl
8 #ifdef __WATCOMC__
9 #include <direct.h>
11 #else
13 #ifdef __cplupplus
14 extern "C" {
15 #endif
17 #include <sys/types.h>
19 #ifndef __OS2_H__
20 #define INCL_DOSFILEMGR
21 #define INCL_DOSERRORS
22 #include <os2.h>
23 #endif
25 #define NAME_MAX 255 /* maximum filename for HPFS or NTFS */
27 typedef struct dirent {
28 HDIR d_handle;
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 */
36 } DIR;
38 #ifndef _A_NORMAL
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 */
46 #endif //_A_NORMAL_
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 * );
56 #if !defined(__os2__)
57 extern int chdir( const char *__path );
58 extern int mkdir( const char *__path );
59 extern int rmdir( const char *__path );
60 #endif
62 #ifdef __cplusplus
64 #endif
66 #endif //__WATCOMC__
68 #endif //incl