Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4349 Serge 1
/*  includes , which is this file.  On a
2
   system which supports , this file is overridden by
3
   dirent.h in the libc/sys/.../sys directory.  On a system which does
4
   not support , we will get this file which uses #error to force
5
   an error.  */
6
 
7
#ifdef __cplusplus
8
extern "C" {
9
#endif
5602 serge 10
 
8759 turbocat 11
#define DT_DIR 16
12
#define DT_REG 0
13
 
14
#include 
15
#include 
16
 
17
struct dirent{
18
   ino_t    d_ino;
19
   unsigned d_type;
20
   char     d_name[256];
5602 serge 21
};
8759 turbocat 22
 
23
typedef struct{
24
    struct dirent* objs;
25
    ino_t pos;
26
    ino_t num_objs;
27
}DIR;
28
 
29
extern int  closedir(DIR *dir);
30
extern DIR* opendir(const char *path);
31
extern struct dirent* readdir(DIR *);
32
extern void rewinddir(DIR *dir);
33
extern void seekdir(DIR *dir, unsigned pos);
34
extern unsigned telldir(DIR *dir);
5602 serge 35
 
8759 turbocat 36
extern int scandir(const char *path, struct dirent ***res, int (*sel)(const struct dirent *), int (*cmp)(const struct dirent **, const struct dirent **));
37
extern int alphasort(const struct dirent **a, const struct dirent **b);
5602 serge 38
 
4349 Serge 39
#ifdef __cplusplus
40
}
41
#endif