summaryrefslogtreecommitdiff
path: root/userland/libc/include/dirent.h
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/include/dirent.h')
-rw-r--r--userland/libc/include/dirent.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/userland/libc/include/dirent.h b/userland/libc/include/dirent.h
index f190a7c..eda2b04 100644
--- a/userland/libc/include/dirent.h
+++ b/userland/libc/include/dirent.h
@@ -7,6 +7,12 @@
#include <sys/types.h>
#include <unistd.h>
+#define STAT_REG 0
+#define STAT_DIR 1
+
+#define S_ISREG(_m) (_m & (1 << STAT_REG))
+#define S_ISDIR(_m) (_m & (1 << STAT_DIR))
+
struct dirent {
ino_t d_ino; // File serial number.
char d_name[PATH_MAX]; // Filename string of entry.