Expand description
Convenience functions for interacting with the remote encrypted virtual filesystem (RE-VFS) Remote Encrypted Virtual Filesystem (RE-VFS)
This module provides high-level operations for interacting with the Remote Encrypted Virtual Filesystem in the Citadel Protocol. RE-VFS enables secure storage and retrieval of files with end-to-end encryption.
§Features
- Secure file storage and retrieval
- Configurable security levels
- Automatic encryption handling
- Virtual path management
- File deletion support
- Take operations for atomic reads
§Example
use citadel_sdk::prelude::*;
use citadel_sdk::fs;
async fn store_file<R: Ratchet>(remote: &impl TargetLockedRemote<R>) -> Result<(), NetworkError> {
// Write a file to RE-VFS
fs::write(remote, "/local/file.txt", "/virtual/file.txt").await?;
// Read the file back
let local_path = fs::read(remote, "/virtual/file.txt").await?;
// Delete the file
fs::delete(remote, "/virtual/file.txt").await?;
Ok(())
}
§Important Notes
- All operations are end-to-end encrypted
- Security levels are configurable per operation
- Take operations atomically read and delete
- Virtual paths are independent of local paths
§Related Components
TargetLockedRemote
: Remote connection interfaceSecurityLevel
: Encryption strength configurationObjectSource
: File source abstractionNetworkError
: Error handling
Functions§
- Deletes a file from the Remote Encrypted Virtual Filesystem
- Reads a file from the Remote Encrypted Virtual Filesystem
- Reads a file from the Remote Encrypted Virtual Filesystem with a custom transport security level
- Takes a file from the Remote Encrypted Virtual Filesystem
- Takes a file from the Remote Encrypted Virtual Filesystem with a custom security level.
- Writes a file or BytesSource to the Remote Encrypted Virtual Filesystem
- Writes a file or BytesSource to the Remote Encrypted Virtual Filesystem with a custom security level.