Cthulhu  0.2.10
Cthulhu compiler collection
fs.c File Reference
#include "common.h"
#include "arena/arena.h"
#include "os/os.h"
#include "io/impl.h"
#include "io/io.h"
#include "std/vector.h"
#include "std/str.h"
#include "std/map.h"
#include "base/util.h"
#include "base/panic.h"
Include dependency graph for fs.c:

Go to the source code of this file.

Functions

STA_DECL void fs_delete (fs_t *fs)
 
STA_DECL void fs_file_create (fs_t *fs, const char *path)
 create a file More...
 
STA_DECL bool fs_file_exists (fs_t *fs, const char *path)
 query if a file exists More...
 
STA_DECL os_error_t fs_file_delete (fs_t *fs, const char *path)
 delete a file More...
 
STA_DECL io_tfs_open (fs_t *fs, const char *path, os_access_t flags)
 open a file at a given location in the filesystem More...
 
STA_DECL 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...
 
STA_DECL bool fs_dir_exists (fs_t *fs, const char *path)
 query if a directory exists More...
 
STA_DECL 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...
 
STA_DECL sync_result_t fs_sync (fs_t *dst, fs_t *src)
 synchronize 2 filesystems copies all folders and files from src to dst More...
 
STA_DECL os_dirent_t fs_inode_type (const fs_inode_t *inode)
 get the type of an inode More...
 
STA_DECL bool fs_inode_is (const fs_inode_t *inode, os_dirent_t type)
 check if a given inode is of a certain type More...
 
STA_DECL const char * fs_inode_name (const fs_inode_t *inode)
 get the name of an inode More...
 
STA_DECL fs_inode_tfs_find_inode (fs_t *fs, const char *path)
 find an inode in a filesystem More...
 
STA_DECL fs_inode_tfs_root_inode (fs_t *fs)
 get the root inode of a filesystem More...
 
STA_DECL os_error_t fs_iter_begin (fs_t *fs, const fs_inode_t *node, fs_iter_t **iter)
 
STA_DECL os_error_t fs_iter_end (fs_iter_t *iter)
 end an iteration More...
 
STA_DECL os_error_t fs_iter_next (fs_iter_t *iter, fs_inode_t **inode)
 

Function Documentation

◆ fs_delete()

STA_DECL void fs_delete ( fs_t fs)

Definition at line 166 of file fs.c.

◆ fs_iter_begin()

STA_DECL os_error_t fs_iter_begin ( fs_t fs,
const fs_inode_t node,
fs_iter_t **  iter 
)

Definition at line 561 of file fs.c.

◆ fs_iter_next()

STA_DECL os_error_t fs_iter_next ( fs_iter_t iter,
fs_inode_t **  inode 
)

Definition at line 602 of file fs.c.