diff options
Diffstat (limited to 'interface/sys/dirent.h')
| -rw-r--r-- | interface/sys/dirent.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/interface/sys/dirent.h b/interface/sys/dirent.h new file mode 100644 index 0000000..bf37746 --- /dev/null +++ b/interface/sys/dirent.h @@ -0,0 +1,26 @@ +#ifndef _DIRENT_H +#define _DIRENT_H + +#include <stdint.h> + +enum FS_FILE_TYPE +{ + FS_FILE_TYPE_DIR = 1, + FS_FILE_TYPE_FILE = 2 +}; + +struct dirent +{ + uint32_t d_ino; + char d_name[255]; + + // rest is optional + uint8_t type; //FILE OR DIR (FS_FILE_TYPE) + + int pos; // position of last read! + char dirname[255]; // directory name we are traversing TODO: use inode here or similar for other systems! +}; + +typedef struct dirent DIR; + +#endif |
