Add basic filesystem structure on linux
This commit is contained in:
parent
d319b0641e
commit
f8dba77275
|
@ -6,3 +6,7 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
fuser = "0.11"
|
||||
log = "0.4"
|
||||
rustcryptfs-lib = { path = "../rustcryptfs-lib" }
|
||||
thiserror = "1.0"
|
|
@ -0,0 +1,28 @@
|
|||
use std::path::Path;
|
||||
|
||||
use fuser::Filesystem;
|
||||
use rustcryptfs_lib::config::CryptConf;
|
||||
|
||||
pub struct EncryptedFs {}
|
||||
|
||||
impl EncryptedFs {
|
||||
pub fn new<P>(path: P) -> Self
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn new_from_config(config: &CryptConf) -> Self {
|
||||
Self {}
|
||||
}
|
||||
|
||||
pub fn mount<P>(self, mountpoint: P)
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
fuser::mount2(self, mountpoint, &[]).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
impl Filesystem for EncryptedFs {}
|
|
@ -0,0 +1,3 @@
|
|||
mod encrypted_filesystem;
|
||||
|
||||
pub use encrypted_filesystem::EncryptedFs;
|
Loading…
Reference in New Issue