summaryrefslogtreecommitdiff
path: root/c/tree/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/tree/tree.h')
-rw-r--r--c/tree/tree.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/c/tree/tree.h b/c/tree/tree.h
new file mode 100644
index 0000000..4ccc687
--- /dev/null
+++ b/c/tree/tree.h
@@ -0,0 +1,34 @@
+/**
+ * @author : garhve (dev@garhve.com)
+ * @file : tree
+ * @created : Wednesday Dec 14, 2022 18:34:27 CST
+ * @description : include and define main functions and structs
+ */
+
+#ifndef TREE_H
+#define TREE_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <sys/stat.h>
+
+typedef struct inodes {
+ char * text;
+ int level;
+ bool fod; // file or dir
+} nodes;
+
+typedef struct regular {
+ nodes * node;
+ struct regular * next;
+} regfile;
+
+void error(const char * str);
+void init(regfile * st);
+void getfile(regfile * head, const char * str);
+
+#endif /* end of include guard TREE_H */