BarryServer : Git

All the code for all my projects
// BarryServer : Git / OrionLibC / commit / 03048a95d88cc7a78171393371f5c22a0250a014 / include / dirent.h

// Related

OrionLibC

Barry Importing existing Orion LibC 03048a9 (2 years, 2 months ago)
diff --git a/include/dirent.h b/include/dirent.h
new file mode 100644
index 0000000..abdad04
--- /dev/null
+++ b/include/dirent.h
@@ -0,0 +1,36 @@
+#ifndef _DIRENT_H
+#define _DIRENT_H
+
+#include <stddef.h>
+#include <sys/types.h>
+
+enum DirType {
+	DT_UNKNOWN,
+	DT_REG,
+	DT_DIR,
+	DT_CHR,
+	DT_BLK,
+	DT_FIFO,
+	DT_SOCK,
+	DT_LNK,
+};
+
+/* Structure for a Directory Entry */
+typedef struct dirent {
+	ino_t ino;
+	enum DirType type;
+	size_t namelen;
+	char name[];
+} DirEnt;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+size_t getdents(int fd, void *buf, size_t count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif