mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-24 11:14:01 +00:00
接着上个
This commit is contained in:
30
clks.local.bak/include/clks/fs.h
Normal file
30
clks.local.bak/include/clks/fs.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef CLKS_FS_H
|
||||
#define CLKS_FS_H
|
||||
|
||||
#include <clks/types.h>
|
||||
|
||||
enum clks_fs_node_type {
|
||||
CLKS_FS_NODE_FILE = 1,
|
||||
CLKS_FS_NODE_DIR = 2,
|
||||
};
|
||||
|
||||
struct clks_fs_node_info {
|
||||
enum clks_fs_node_type type;
|
||||
u64 size;
|
||||
};
|
||||
|
||||
void clks_fs_init(void);
|
||||
clks_bool clks_fs_is_ready(void);
|
||||
clks_bool clks_fs_stat(const char *path, struct clks_fs_node_info *out_info);
|
||||
const void *clks_fs_read_all(const char *path, u64 *out_size);
|
||||
u64 clks_fs_count_children(const char *dir_path);
|
||||
clks_bool clks_fs_get_child_name(const char *dir_path, u64 index, char *out_name, usize out_name_size);
|
||||
|
||||
clks_bool clks_fs_mkdir(const char *path);
|
||||
clks_bool clks_fs_write_all(const char *path, const void *data, u64 size);
|
||||
clks_bool clks_fs_append(const char *path, const void *data, u64 size);
|
||||
clks_bool clks_fs_remove(const char *path);
|
||||
|
||||
u64 clks_fs_node_count(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user