55typedef enum : uint8_t {
398 uint16_t* out_max_open);
414 uint32_t workspace_bytes);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Minimal FAT12/FAT16/FAT32 filesystem adapter (read + write).
ra8_fs_mode_t
File-open modes accepted by ra8_fs_open().
void(* ra8_fs_listdir_cb_t)(const char *name, uint8_t attr, uint64_t size, void *ctx)
Callback invoked once per directory entry by ra8_fs_listdir().
ra8_io pluggable filesystem-format registry (probe + capabilities).
ra8_err_t ra8_io_vfs_dir_requirements(const char *path, uint32_t *out_bytes, uint8_t *out_align, uint16_t *out_max_open)
Query cursor workspace requirements for a qualified directory path.
ra8_err_t ra8_io_vfs_listdir(const char *path, ra8_fs_listdir_cb_t cb, void *ctx)
Enumerate a directory named "name:/path".
ra8_err_t ra8_io_vfs_mount(const char *name, ra8_fs_mount_t *mount)
Register a mounted volume under a name.
ra8_err_t ra8_io_vfs_free_space(const char *name, ra8_fs_space_t *out)
Query free and total bytes through a mounted format's ops.
ra8_err_t ra8_io_vfs_open(const char *path, ra8_fs_mode_t mode, ra8_fs_file_t **out_file)
Open a file by "name:/path".
ra8_err_t ra8_io_vfs_file_close(ra8_io_vfs_file_t *file)
Close and always release one format-neutral stream facade.
ra8_err_t ra8_io_vfs_file_size(const ra8_io_vfs_file_t *file, uint64_t *out_bytes)
Report a format-neutral stream's size.
ra8_err_t ra8_io_vfs_get_caps(const char *name, ra8_io_fsfmt_caps_t *out)
Copy the truthful capabilities of a named mounted format.
ra8_io_vfs_limits_t
Static limits for the VFS mount table.
@ k_ra8_io_vfs_max_mounts
Concurrent named mounts.
@ k_ra8_io_vfs_max_files
Concurrent generic streams.
@ k_ra8_io_vfs_name_max
Mount name length incl NUL.
ra8_err_t ra8_io_vfs_dir_next(ra8_io_vfs_dir_t *directory, ra8_fs_dirent_t *out, bool *out_entry)
Copy one stable entry or report clean end-of-directory.
ra8_err_t ra8_io_vfs_mkdir(const char *path)
Create a directory named "name:/path".
ra8_err_t ra8_io_vfs_file_sync(ra8_io_vfs_file_t *file)
Explicitly sync a stream, or return not-supported when unavailable.
ra8_err_t ra8_io_vfs_unlink(const char *path)
Delete a file by "name:/path".
ra8_err_t ra8_io_vfs_mount_auto(const char *name, const ra8_fs_backend_t *backend)
Probe and mount a block backend through the registered format ops.
ra8_err_t ra8_io_vfs_dir_close(ra8_io_vfs_dir_t *directory)
Close and consume one caller-owned VFS directory cursor.
ra8_err_t ra8_io_vfs_file_open(const char *path, ra8_fs_mode_t mode, ra8_io_vfs_file_t **out_file)
Open a format-neutral stream through a mounted format's ops.
ra8_err_t ra8_io_vfs_stat(const char *path, ra8_io_vfs_stat_t *out)
Query metadata for "name:/path".
ra8_err_t ra8_io_vfs_rmdir(const char *path)
Remove the empty directory named "name:/path".
ra8_err_t ra8_io_vfs_unmount(const char *name)
Remove a named mount from the table.
ra8_err_t ra8_io_vfs_file_read(ra8_io_vfs_file_t *file, void *buf, uint32_t bytes, uint32_t *out_read)
Read bytes through a format-neutral stream.
ra8_err_t ra8_io_vfs_dir_open(const char *path, ra8_io_vfs_dir_t *directory, void *workspace, uint32_t workspace_bytes)
Open a format-neutral incremental directory cursor.
ra8_err_t ra8_io_vfs_file_seek(ra8_io_vfs_file_t *file, uint64_t offset_bytes)
Seek a format-neutral stream.
ra8_err_t ra8_io_vfs_rename(const char *old_path, const char *new_path)
Rename a file within one mount.
ra8_err_t ra8_io_vfs_file_tell(const ra8_io_vfs_file_t *file, uint64_t *out_offset)
Report a format-neutral stream's current offset.
ra8_err_t ra8_io_vfs_init(void)
Reset the VFS mount table to empty.
ra8_err_t ra8_io_vfs_file_write(ra8_io_vfs_file_t *file, const void *buf, uint32_t bytes)
Write bytes, or return not-supported when capability-gated.
Block-device interface that ra8_fs runs on top of.
Stable directory-entry value copied by ra8_fs_dir_next.
Cached parse of one mounted FAT volume.
A mounted volume's capacity, free space, and cluster geometry.
One decoded on-disk timestamp plus availability facts.
What a filesystem format supports.
One registered filesystem format.
Caller-owned format-neutral directory cursor.
void * state
Caller-supplied format state.
uint32_t state_bytes
Accessible state extent.
bool is_open
VFS lifecycle guard.
const ra8_io_fsfmt_t * format
Format owning the cursor state.
Opaque, statically-pooled format-neutral file stream.
Publicly opaque stream facade, drawn from s_files.
Metadata returned by ra8_io_vfs_stat.
uint8_t attr
The entry's own FAT attribute byte.
uint64_t size_bytes
File size in bytes (0 for directories).
ra8_fs_timestamp_t modified
Last-modified time, when present.
bool is_directory
true => path names a directory.
ra8_fs_timestamp_t accessed
Last-accessed time/date, when present.
ra8_fs_timestamp_t created
Creation time, when present.
bool exists
true => the path resolves to an entry.