StudioStorage
trait · ferroui-protranslate-studio · v0.5.0
trait StudioStorage
Relative paths are scoped by the host's storage instance. Writes are atomic:
errors must leave the old destination intact. Missing files are Ok(None).
Members
read
fn read(self: &Self, path: &str) -> Result<Option<Vec<u8>>, StudioError>
write_atomic
fn write_atomic(self: &Self, path: &str, bytes: &[u8]) -> Result<(), StudioError>
write_new_atomic
fn write_new_atomic(self: &Self, path: &str, bytes: &[u8]) -> Result<bool, StudioError>
Atomically create a complete file only if absent; false never replaces it.
remove
fn remove(self: &Self, path: &str) -> Result<(), StudioError>
list
fn list(self: &Self, directory: &str) -> Result<Vec<StorageEntry>, StudioError>
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.