Added cs to the list of languages
[midnight-commander.git] / nt / dirent.h
blobd9c248c3e4076db9106ae845400cf375500f0913
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 #define NAME_MAX 255 /* maximum filename for HPFS or NTFS */
21 typedef struct dirent {
22 void* d_handle;
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 */
30 } DIR;
32 #ifndef _A_NORMAL
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 */
40 #endif //_A_NORMAL_
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 );
54 #ifdef __cplusplus
56 #endif
58 #endif //__WATCOMC__
60 #endif //incl