Crates.io | remotefs-memory |
lib.rs | remotefs-memory |
version | 0.1.5 |
source | src |
created_at | 2024-10-22 10:33:51.131987 |
updated_at | 2024-10-25 17:11:54.446654 |
description | remotefs implementation for volatile memory. Good for testing and simulation. |
homepage | |
repository | https://github.com/remotefs-rs/remotefs-rs-memory |
max_upload_size | |
id | 1418476 |
size | 45,094 |
~ A remotefs implementation for testing and simulation ~
Developed by @veeso
Current version: 0.1.5
Add remotefs-memory
to your Cargo.toml
:
remotefs = "0.3"
remotefs-memory = "0.1"
use std::path::PathBuf;
use remotefs_memory::{Inode, MemoryFs, node, Node, Tree};
use remotefs::RemoteFs;
use remotefs::fs::{UnixPex, Metadata};
let tempdir = PathBuf::from("/tmp");
let tree = Tree::new(node!(
PathBuf::from("/"),
Inode::dir(0, 0, UnixPex::from(0o755)),
node!(tempdir.clone(), Inode::dir(0, 0, UnixPex::from(0o755)))
));
let mut client = MemoryFs::new(tree);
assert!(client.connect().is_ok());
// Change directory
assert!(client.change_dir(tempdir.as_path()).is_ok());
View remotefs` changelog HERE
remotefs is licensed under the MIT license.
You can read the entire license HERE