Expand description
Simple File I/O Operations
Provides synchronous file read/write operations for simple use cases.
For async operations or more advanced file handling, use the fs
module with the Vfs trait.
§Features
Requires the persistence feature.
§Platform Support
- Native: Full support via
std::fs - WASM: Not available (use OPFS via the
fsmodule instead)
§Example
use logicaffeine_system::file;
// Write a file
file::write("data.txt".to_string(), "Hello, World!".to_string())?;
// Read it back
let content = file::read("data.txt".to_string())?;
assert_eq!(content, "Hello, World!");