use crate::fat32::create_fat32_image;
use crate::iso::create_iso_from_img;
use std::{io, path::Path};
use tempfile::NamedTempFile;
mod fat32;
mod iso;
mod utils;
pub fn create_disk_and_iso(
iso_path: &Path,
bellows_path: &Path,
kernel_path: &Path,
) -> io::Result<()> {
println!("create_disk_and_iso: Starting process...");
let mut fat32_img_file = NamedTempFile::new()?;
let fat32_img_path = fat32_img_file.path().to_owned();
create_fat32_image(fat32_img_file.as_file_mut(), bellows_path, kernel_path)?;
create_iso_from_img(iso_path, &fat32_img_path)?;
println!("create_disk_and_iso: Process complete. ISO created successfully.");
Ok(())
}