7 #ifndef EXT_FILESYSTEM_CORE_METHODS_H_
8 #define EXT_FILESYSTEM_CORE_METHODS_H_
26 const struct superblock* superblock,
27 uint16_t parent_node_id,
39 const struct superblock* superblock,
40 uint16_t parent_node_id);
51 const struct superblock* superblock);
64 const struct superblock* superblock);
77 const struct superblock* superblock);
79 #endif //EXT_FILESYSTEM_CORE_METHODS_H_
uint16_t get_file_inode_id(int fd, struct inode *inode, const char *dirname, const struct superblock *superblock)
Return inode_id of file.
uint16_t create_file_helper(int fd, const struct superblock *superblock, uint16_t parent_node_id)
Helper for create new file Creates file with parent = parent_node_id.
Contains superblock struct and its methods.
uint16_t create_dir_helper(int fd, const struct superblock *superblock, uint16_t parent_node_id, bool is_root)
Helper for create new directory Creates dir with parent = parent_node_id (or itself if is_root)...
uint16_t get_inode_id_of_dir(int fd, const char *path, const struct superblock *superblock)
Parse path and find inode of this dir.
Contains inode struct and its methods.
Contains block struct and its methods.
bool is_dir_exist(int fd, struct inode *inode, const char *dirname, const struct superblock *superblock)
Check if dir exists in inode.