feat: implement rmdir(2), unlink(2), unlinkat(2)
[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     void* data;
11     uint32_t itype;
12     struct llist_header children;
13     struct llist_header siblings;
14     struct v_file_ops fops;
15 };
16
17 void
18 twifs_init();
19
20 struct twifs_node*
21 twifs_file_node(struct twifs_node* parent, const char* name, int name_len);
22
23 struct twifs_node*
24 twifs_dir_node(struct twifs_node* parent, const char* name, int name_len);
25
26 struct twifs_node*
27 twifs_toplevel_node(const char* name, int name_len);
28
29 int
30 twifs_rm_node(struct twifs_node* node);
31
32 #endif /* __LUNAIX_TWIFS_H */