iso9660_core 0.1.0

Read-only ISO9660 crate for no_std environments (WIP)
Documentation
  • Coverage
  • 15.33%
    21 out of 137 items documented0 out of 60 items with examples
  • Size
  • Source code size: 58.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Mathis-Z/iso9660_core
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Mathis-Z

What is this?

  • work in progress implementation of the ISO9660 filesystem (read-only)
  • works in no_std and without alloc
  • support for multi-extent (e.g, >4GB) files
  • support for extensions

Usage

use iso9660_core::{ISO9660, iso9660entry::IsISO9660Record};
use std::fs::File;

fn main() -> iso9660_core::ISOResult<()> {
    // Open an existing ISO file
    let iso_path = "example.iso";
    let file = File::open(iso_path)?;
    let mut fs = ISO9660::load(file)?;

    // List the root directory
    let mut iter = fs.listdir("/")?;
    println!("Root directory:");
    while let Some(entry) = iter.next(&mut fs) {
        let entry = entry?;
        println!("  {}", entry.identifier());
    }

    // Read a file into a buffer
    let mut buffer = vec![0u8; 1024]; // adjust size as needed
    let bytes_read = fs.read("README.TXT", &mut buffer, 0)?;
    println!("Read {} bytes from README.TXT", bytes_read);

    // Get total size of a file
    let total_size = fs.total_size("README.TXT")?;
    println!("Total size of README.TXT: {} bytes", total_size);

    // Optional: print the directory tree
    #[cfg(feature = "std")]
    fs.print_tree();

    Ok(())
}

Tests

The tests require genisoimage to be installed. Run with:
cargo test --features std

To run all tests:
cargo test --features std -- --include-ignored
(includes a test which runs longer and also needs ~5GB of free disk space to build the ISO)

Links