Crates.io | damascus |
lib.rs | damascus |
version | 0.0.6 |
source | src |
created_at | 2024-11-11 15:27:50.52546 |
updated_at | 2024-11-11 19:37:42.438386 |
description | filesystem utility crate for the Flamberg mod manager stack |
homepage | |
repository | https://github.com/Yato202010/Damascus |
max_upload_size | |
id | 1443851 |
size | 728,297 |
Damascus is a utility crate focused on providing a simple way to interact with filesystem from rust
System | Status | Available Handle |
---|---|---|
Window | Unsupported | / |
Linux | Supported | OverlayFs , FuseOverlayFs |
Linux | Experimental | UnionFsFuse |
MacOS | Unsupported | / |
use damascus::{Filesystem, FuseOverlayFs, FuseOverlayFsOption, LinuxFilesystem, MountOption};
// handle can be created using complex or simple interface based on need
// NOTE : drop control if once dropped the filesystem should be unmounted
let mut o = FuseOverlayFs::new([&lower1, &lower2].iter(), Some(upper), Some(work), target, drop).unwrap();
// or
let mut o = FuseOverlayFs::writable([&lower1, &lower2].iter(), upper, work, &target).unwrap();
// or
let mut o = FuseOverlayFs::readonly([&lower1, &lower2].iter(), target).unwrap();
o.set_option(FuseOverlayFsOption::AllowRoot).unwrap();
o.set_unmount_on_drop(false); // true by default
// once configured you can mount it
o.mount().unwrap();
// and then unmount it
o.unmount().unwrap();