my homework was late :-)
[midnight-commander.git] / pc / dirent.h
blob0f153f53f284cc23facae9a49e344c6c00025207
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 __cplupplus
9 extern "C" {
10 #endif
12 #include <sys/types.h>
14 #define NAME_MAX 255 /* maximum filename for HPFS or NTFS */
16 typedef struct dirent {
17 unsigned long* d_handle;
18 unsigned d_attr; /* file's attribute */
19 unsigned short int d_time; /* file's time */
20 unsigned short int d_date; /* file's date */
21 long d_size; /* file's size */
22 char d_name[ NAME_MAX + 1 ]; /* file's name */
23 unsigned short d_ino; /* serial number (not used) */
24 char d_first; /* flag for 1st time */
25 } DIR;
27 extern int closedir( DIR * );
28 extern DIR *opendir( const char * );
29 extern struct dirent *readdir( DIR * );
31 #ifdef __cplusplus
33 #endif
35 #endif /* _DIRENT_H_incl */