backup_iso - OmniCloudOrg/OmniOrchestrator GitHub Wiki

iso (src/backup)

Path: src/backup/iso.rs

Table of Contents

Public Items

struct IsoManager

Definition

pub struct IsoManager {
    temp_dir: PathBuf,
}

Documentation

Manages creation, validation, and processing of ISO files

fn new

Definition

    pub fn new(temp_dir: impl Into<PathBuf>) -> Self {
        Self {
    // ... function body
}

Documentation

Create a new IsoManager instance

fn validate_iso_structure

Definition

    pub fn validate_iso_structure(&self, iso_path: &Path) -> Result<bool> {
        // In a real implementation, mount the ISO and check its structure
        // For this example, we'll just check that the file exists
        if !iso_path.exists() {
    // ... function body
}

Documentation

Ensure the ISO directory structure is valid

fn create_iso_structure_template

Definition

    pub fn create_iso_structure_template(&self, component_type: &str, backup_id: i32) -> Result<PathBuf> {
        let template_dir = self.temp_dir.join(format!("{}-{}-template", component_type, backup_id));

Documentation

Create ISO directory structure template

fn create_iso_from_directory

Definition

    pub fn create_iso_from_directory(
        &self,
        src_dir: &Path,
        output_path: &Path,
        label: &str,
        encryption_method: Option<&str>
    ) -> Result<PathBuf> {
    // ... function body
}

Documentation

Create ISO file from directory

fn extract_iso_to_directory

Definition

    pub fn extract_iso_to_directory(&self, iso_path: &Path, output_dir: &Path) -> Result<PathBuf> {
        info!("Extracting ISO: {} to {}", iso_path.display(), output_dir.display());

Documentation

Extract content from an ISO to a directory

fn get_iso_size

Definition

    pub fn get_iso_size(&self, iso_path: &Path) -> Result<u64> {
        let metadata = fs::metadata(iso_path)?;

Documentation

Calculate the size of an ISO file

fn get_iso_metadata

Definition

    pub fn get_iso_metadata(&self, iso_path: &Path) -> Result<Value> {
        // In a real implementation, mount the ISO and read manifest.json
        // For this example, return placeholder metadata
        
        Ok(json!({
    // ... function body
}

Documentation

Get ISO metadata

fn create_backup_manifest

Definition

pub fn create_backup_manifest(backup: &Backup, backup_dir: &Path) -> Result<()> {
    use std::fs;
⚠️ **GitHub.com Fallback** ⚠️