Rev 8687 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8687 | turbocat | 1 | /* Copyright (C) 2021 Logaev Maxim (turbocat2001), GPLv2 */ |
2 | |||
3 | #ifndef _DIRENT_H_ |
||
4 | #define _DIRENT_H_ |
||
5 | |||
6 | #include |
||
7 | #include |
||
8 | |||
9 | #define IS_FOLDER 16 |
||
10 | #define IS_FILE 0 |
||
11 | |||
12 | typedef unsigned ino_t; |
||
13 | |||
14 | struct dirent{ |
||
8730 | turbocat | 15 | ino_t d_ino; //File serial number. |
8687 | turbocat | 16 | char d_name[PATH_MAX]; // Name of entry. |
17 | unsigned d_type; |
||
18 | }; |
||
19 | |||
20 | typedef struct{ |
||
21 | struct dirent* objs; |
||
22 | ino_t pos; |
||
23 | ino_t num_objs; |
||
24 | }DIR; |
||
25 | |||
26 | |||
27 | int _FUNC(closedir)(DIR *dir); |
||
28 | DIR* _FUNC(opendir)(const char *path); |
||
29 | struct dirent* _FUNC(readdir)(DIR *); |
||
30 | void _FUNC(rewinddir)(DIR *dir); |
||
31 | void _FUNC(seekdir)(DIR *dir, unsigned pos); |
||
32 | unsigned _FUNC(telldir)(DIR *dir); |
||
33 | |||
8730 | turbocat | 34 | #endif // _DIRENT_H_ |