feat: open(2), close(2), mkdir(2) and readdir(2) syscall
[lunaix-os.git] / lunaix-os / includes / lunaix / fs / twifs.h
1 #ifndef __LUNAIX_TWIFS_H
2 #define __LUNAIX_TWIFS_H
3
4 #include <lunaix/fs.h>
5
6 struct twifs_node
7 {
8     struct v_inode* inode;
9     struct hstr name;
10     uint32_t itype;
11     struct llist_header children;
12     struct llist_header siblings;
13     struct v_file_ops fops;
14 };
15
16 void
17 twifs_init();
18
19 struct twifs_node*
20 twifs_file_node(struct twifs_node* parent, const char* name, int name_len);
21
22 struct twifs_node*
23 twifs_dir_node(struct twifs_node* parent, const char* name, int name_len);
24
25 struct twifs_node*
26 twifs_toplevel_node(const char* name, int name_len);
27
28 #endif /* __LUNAIX_TWIFS_H */