74 uint32_t workspace_size);
100 const char* old_path,
101 const char* new_path,
117 uint32_t workspace_size);
160 const char* destination,
164 uint32_t workspace_size);
172 const uint8_t* source,
174 uint32_t* out_written);
183 uint64_t absolute_offset);
191 void* validator_ctx);
203 bool* out_published);
ra8_err_t fw_fs_open(const fw_fs_stream_port_t *streams, const char *path, fw_fs_open_mode_t mode, fw_fs_file_t *file, void *workspace, uint32_t workspace_size)
Open a file into a caller-owned handle and backend workspace.
ra8_err_t fw_fs_transaction_seek(fw_fs_transaction_t *transaction, uint64_t absolute_offset)
Seek the staging writer to an absolute byte offset for bounded backfill.
ra8_err_t fw_fs_listdir(const fw_fs_namespace_t *names, const char *path, uint32_t max_entries, fw_fs_list_fn_t callback, void *callback_ctx, uint32_t *out_count, bool *out_complete)
Enumerate at most max_entries callback entries.
ra8_err_t fw_fs_get_caps(const fw_fs_t *fs, fw_fs_caps_t *out)
Copy the immutable capability snapshot from a complete binding.
ra8_err_t fw_fs_tell(fw_fs_file_t *file, uint64_t *out_offset)
Report the current absolute offset.
ra8_err_t fw_fs_transaction_abort(fw_fs_transaction_t *transaction)
Close and remove an unpublished staging artifact.
ra8_err_t fw_fs_write(fw_fs_file_t *file, const uint8_t *source, uint32_t length, uint32_t *out_written)
Attempt to write all bytes, reporting any accepted prefix.
ra8_err_t fw_fs_stat(const fw_fs_namespace_t *names, const char *path, fw_fs_stat_t *out)
Query a path; a miss is success with out->exists == false.
ra8_err_t fw_fs_transaction_validate(fw_fs_transaction_t *transaction, fw_fs_validate_fn_t validator, void *validator_ctx)
Flush/reopen the stage and ask validator to inspect it read-only.
ra8_err_t fw_fs_rmdir(const fw_fs_namespace_t *names, const char *path)
Remove one empty directory; recursive deletion is deliberately absent.
ra8_err_t fw_fs_read(fw_fs_file_t *file, uint8_t *dst, uint32_t cap, uint32_t *out_read)
Read up to cap bytes; zero bytes is EOF.
ra8_err_t fw_fs_dir_next(fw_fs_dir_t *directory, fw_fs_dirent_value_t *out, bool *out_entry)
Copy one stable directory entry from an open cursor.
ra8_err_t fw_fs_dir_close(fw_fs_dir_t *directory)
Close and consume an open directory cursor, including on close error.
ra8_err_t fw_fs_sync(fw_fs_file_t *file)
Request file synchronization or return k_ra8_err_not_supported.
ra8_err_t fw_fs_transaction_begin(const fw_fs_transaction_port_t *port, const char *destination, fw_fs_transaction_policy_t policy, fw_fs_transaction_t *transaction, void *workspace, uint32_t workspace_size)
Create a hidden sibling staging file for one destination.
ra8_err_t fw_fs_transaction_write(fw_fs_transaction_t *transaction, const uint8_t *source, uint32_t length, uint32_t *out_written)
Append bytes to the private staging artifact.
ra8_err_t fw_fs_close(fw_fs_file_t *file)
Close and consume an open handle.
ra8_err_t fw_fs_rename(const fw_fs_namespace_t *names, const char *old_path, const char *new_path, bool replace)
Rename inside one bound root/volume with optional atomic replacement.
ra8_err_t fw_fs_seek(fw_fs_file_t *file, uint64_t absolute_offset)
Seek to an absolute byte offset from the beginning.
ra8_err_t fw_fs_transaction_commit(fw_fs_transaction_t *transaction, bool *out_published)
Publish a validated stage.
ra8_err_t fw_fs_path_validate(const fw_fs_caps_t *caps, const char *path)
Validate a canonical portable path against a binding's limits.
ra8_err_t fw_fs_space(const fw_fs_namespace_t *names, fw_fs_space_t *out)
Report total/free/used bytes when space-query capability is present.
ra8_err_t fw_fs_unlink(const fw_fs_namespace_t *names, const char *path)
Remove one regular file; directories require fw_fs_rmdir.
ra8_err_t fw_fs_file_size(fw_fs_file_t *file, uint64_t *out_size)
Report the open file's current length.
ra8_err_t fw_fs_dir_open(const fw_fs_namespace_t *names, const char *path, fw_fs_dir_t *directory, void *workspace, uint32_t workspace_size)
Open one directory cursor into caller-owned backend workspace.
ra8_err_t fw_fs_mkdir(const fw_fs_namespace_t *names, const char *path)
Create exactly one directory; parents must already exist.
Portable filesystem value types and caller-owned opaque handles.
ra8_err_t(* fw_fs_validate_fn_t)(void *ctx, fw_fs_file_t *staged)
Validate staged bytes through a read-only generic file handle.
fw_fs_open_mode_t
Open intent for fw_fs_open.
ra8_err_t(* fw_fs_list_fn_t)(void *ctx, const fw_fs_dirent_t *entry, bool *out_continue)
Bounded list callback.
fw_fs_transaction_policy_t
Destination policy for a staged transaction.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Static properties and workspace requirements of one bound port.
Caller-owned open directory cursor; fields are private to the facade.
Stable caller-owned value returned by fw_fs_dir_next.
Caller-owned open file; fields are private to the facade.
Independently injectable path/namespace facade.
Portable volume usage snapshot.
Result of a portable metadata query.
Independently injectable open-stream facade.
One complete composition-root filesystem binding.
Independently injectable staged-transaction facade.
Caller-owned transaction; fields are private to the facade.