diff options
| author | Miguel <m.i@gmx.at> | 2018-10-15 16:29:50 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-15 16:29:50 +0200 |
| commit | e3a8099343aac9d94f411638ad84632d4b620132 (patch) | |
| tree | f0a1f73ab106c17b25fd8a5264a66b6b48e55e48 /interface/sys/dirent.h | |
| parent | f35d2124c36f8d39a953b76620e081b79c2faffd (diff) | |
cleanup sys/ etc
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 |
