Module file_storage

Module file_storage 

Source
Expand description

High-level file storage that encrypts files and stores them in blob storage

This module provides a higher-level abstraction for storing files that:

  1. Reads files from disk
  2. Encrypts them using convergent encryption
  3. Stores encrypted data in blob storage
  4. Returns metadata for later retrieval

§Usage

use zoe_client::FileStorage;
use std::path::Path;
use tempfile::tempdir;

let temp_dir = tempdir()?;
let storage = FileStorage::new(temp_dir.path()).await?;

// Store a file
let file_path = Path::new("/path/to/my/file.txt");
let stored_info = storage.store_file(file_path).await?;

// Later, retrieve the file
let retrieved_data = storage.retrieve_file(&stored_info).await?;

Structs§

FileStorage
High-level file storage client that encrypts files and stores them as blobs