-
Notifications
You must be signed in to change notification settings - Fork 7
lib_filesys
pf4 edited this page Sep 4, 2024
·
3 revisions
Warning
This page is under construction and may not be accurate...
Contact me on Discord @pf4
for details or questions :)
#define NULL_SID ((sid_t) {0, 0})
#define ROOT_SID ((sid_t) {1, 0})
#define IS_NULL_SID(sid) (sid.device == 0 && sid.sector == 0)
#define IS_SAME_SID(sid1, sid2) (sid1.device == sid2.device && sid1.sector == sid2.sector)
int fu_is_dir (
sid_t dir_sid
);
int fu_get_dir_content (
sid_t dir_sid,
sid_t **ids,
char ***names
);
int fu_add_element_to_dir (
sid_t dir_sid,
sid_t element_sid,
char *name
);
int fu_remove_element_from_dir (
sid_t dir_sid,
sid_t element_sid
);
sid_t fu_dir_create (
int device_id,
char *path
);
int fu_is_file (
sid_t dir_sid
);
sid_t fu_file_create (
int device_id,
char *path
);
int fu_file_read (
sid_t file_sid,
void *buf,
uint32_t offset,
uint32_t size
);
int fu_file_write (
sid_t file_sid,
void *buf,
uint32_t offset,
uint32_t size
);
#define fu_get_file_size(sid) (c_fs_cnt_get_size(c_fs_get_main(), sid))
#define fu_set_file_size(sid, size) (c_fs_cnt_set_size(c_fs_get_main(), sid, size))
int fu_is_fctf (
sid_t file_sid
);
sid_t fu_fctf_create (
int device_id,
char *path,
int (*fct) (
void *,
uint32_t,
uint32_t,
uint8_t
)
);
uint32_t fu_fctf_get_addr (
sid_t file_sid
);
int fu_fctf_rw (
sid_t file_sid,
void *buf,
uint32_t offset,
uint32_t size,
uint8_t is_read
);
#define fu_fctf_write(sid, buf, offset, size) (fu_fctf_rw(sid, buf, offset, size, 0))
#define fu_fctf_read(sid, buf, offset, size) (fu_fctf_rw(sid, buf, offset, size, 1))
void fu_sep_path (
char *fullpath,
char **parent,
char **cnt
);
sid_t fu_path_to_sid (
sid_t from,
char *path
);
void fu_simplify_path (
char *path
);
uint32_t *fu_get_vdisk_info (void);
-
Getting Started
- Compiling profanOS
- Running profanOS
-
User Guide
-
Development Guide
-
Library Documentation