Cthulhu  0.2.10
Cthulhu compiler collection
fs.h File Reference
#include <ctu_fs_api.h>
#include "os/core.h"
#include <stdbool.h>
Include dependency graph for fs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sync_result_t
 the result of a fs_sync call this is here because we cant use Compiler message notification in the fs api More...
 

Typedefs

typedef typedefCT_BEGIN_API struct arena_t arena_t
 

Functions

CT_FS_API void fs_delete (STA_RELEASE fs_t *fs)
 delete a filesystem handle More...
 
CT_NODISCARD CT_FS_API fs_tfs_physical (const char *root, arena_t *arena)
 create a filesystem interface to a physical location on disk More...
 
CT_NODISCARD CT_FS_API fs_tfs_virtual (const char *name, arena_t *arena)
 create a virtual filesystem interface More...
 
CT_FS_API os_error_t fs_dir_create (fs_t *fs, const char *path)
 create a directory create a directory and all child directories inside a filesystem More...
 
CT_FS_API void fs_file_create (fs_t *fs, const char *path)
 create a file More...
 
CT_NODISCARD CT_FS_API io_tfs_open (fs_t *fs, const char *path, os_access_t flags)
 open a file at a given location in the filesystem More...
 
CT_NODISCARD CT_FS_API bool fs_dir_exists (fs_t *fs, const char *path)
 query if a directory exists More...
 
CT_NODISCARD CT_FS_API bool fs_file_exists (fs_t *fs, const char *path)
 query if a file exists More...
 
CT_FS_API os_error_t fs_dir_delete (fs_t *fs, const char *path)
 delete a directory delete a directory and all contained files and folders More...
 
CT_FS_API os_error_t fs_file_delete (fs_t *fs, const char *path)
 delete a file More...
 
CT_FS_API sync_result_t fs_sync (fs_t *dst, fs_t *src)
 synchronize 2 filesystems copies all folders and files from src to dst More...
 
CT_PUREFN CT_FS_API os_dirent_t fs_inode_type (const fs_inode_t *inode)
 get the type of an inode More...
 
CT_PUREFN CT_FS_API bool fs_inode_is (const fs_inode_t *inode, os_dirent_t type)
 check if a given inode is of a certain type More...
 
CT_PUREFN CT_FS_API const char * fs_inode_name (const fs_inode_t *inode)
 get the name of an inode More...
 
CT_FS_API fs_inode_tfs_find_inode (fs_t *fs, const char *path)
 find an inode in a filesystem More...
 
CT_PUREFN CT_FS_API fs_inode_tfs_root_inode (fs_t *fs)
 get the root inode of a filesystem More...
 
CT_FS_API os_error_t fs_iter_begin (fs_t *fs, const fs_inode_t *node, OUT_NOTNULL fs_iter_t **iter)
 begin iterating over a directory More...
 
CT_FS_API os_error_t fs_iter_end (fs_iter_t *iter)
 end an iteration More...
 
CT_FS_API os_error_t fs_iter_next (fs_iter_t *iter, OUT_NOTNULL fs_inode_t **inode)
 get the next inode in an iteration More...
 

Typedef Documentation

◆ arena_t

typedef typedefCT_BEGIN_API struct arena_t arena_t

Definition at line 11 of file fs.h.