iso9660/
lib.rs

1//! ISO9660 Filesystem Implementation
2//!
3//! A `no_std` implementation of the ISO9660 filesystem with El Torito boot support.
4//!
5//! # Overview
6//!
7//! ISO9660 is the standard filesystem for CD-ROMs and DVDs. This crate provides:
8//! - Volume descriptor parsing (Primary, Supplementary, Boot Record)
9//! - Directory tree navigation
10//! - File reading from extent-based storage
11//! - El Torito bootable CD support for kernel extraction
12//! - Optional Rock Ridge (POSIX) and Joliet (Unicode) extensions
13//!
14//! # Architecture
15//!
16//! The implementation is layered:
17//! 1. **Volume layer** - Parses volume descriptors from sectors 16+
18//! 2. **Directory layer** - Navigates directory records and path tables
19//! 3. **File layer** - Reads file data from extents
20//! 4. **Boot layer** - El Torito boot catalog parsing
21//!
22//! # Usage
23//!
24//! ```ignore
25//! use iso9660::{mount, find_file, read_file};
26//! 
27//! // Mount ISO from block device at given start sector
28//! let volume = mount(&mut block_io, start_sector)?;
29//! 
30//! // Find a file by path
31//! let file = find_file(&mut block_io, &volume, "/isolinux/vmlinuz")?;
32//! 
33//! // Read file contents
34//! let kernel_data = read_file(&mut block_io, &volume, &file)?;
35//! ```
36//!
37//! # El Torito Boot Support
38//!
39//! ```ignore
40//! use iso9660::find_boot_image;
41//! 
42//! // Extract bootable image (kernel) from ISO
43//! let boot = find_boot_image(&mut block_io, &volume)?;
44//! let kernel = read_file(&mut block_io, &volume, &boot.file)?;
45//! ```
46
47#![no_std]
48#![warn(missing_docs)]
49
50extern crate alloc;
51
52pub mod error;
53pub mod types;
54pub mod volume;
55pub mod directory;
56pub mod file;
57pub mod boot;
58pub mod extensions;
59pub mod utils;
60
61pub use error::{Iso9660Error, Result};
62pub use types::{VolumeInfo, FileEntry, FileFlags, BootImage, BootMediaType, BootPlatform};
63
64// High-level API exports
65pub use volume::mount;
66pub use directory::find_file;
67pub use directory::iterator::DirectoryIterator;
68pub use file::{read_file, read_file_vec};
69pub use file::reader::FileReader;
70pub use boot::find_boot_image;