Expand description
SQLiteFS - In-App filesystem based on SQLite
§Example 1:
use sqlitefs::{sqlitefs_file::SqliteFsFile as File, sqlitefs_fs::SqliteFs};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let fs_path = "FS.SQLITE";
let f_name = "my cool file name";
SqliteFs::init(fs_path).await?;
let mut f = File::create(f_name).await.unwrap();
f.set_compressed(true);
f.write("This could be your data! ;)".as_bytes()).await?;
let mut t = String::new();
f.read_to_string(&mut t).await?;
println!("{t}");
Ok(())
}
Re-exports§
pub use sqlitefs_fs::SqliteFs;