Crate nod

source ·
Expand description

Library for traversing & reading GameCube and Wii disc images.

Based on the C++ library nod, but does not currently support authoring.

Currently supported file formats:

  • ISO (GCM)
  • WIA / RVZ
  • WBFS
  • NFS (Wii U VC files, e.g. hif_000000.nfs)

§Examples

Opening a disc image and reading a file:

use std::io::Read;

use nod::{Disc, PartitionKind};

fn main() -> nod::Result<()> {
    let disc = Disc::new("path/to/file.iso")?;
    let mut partition = disc.open_partition_kind(PartitionKind::Data)?;
    let meta = partition.meta()?;
    let fst = meta.fst()?;
    if let Some((_, node)) = fst.find("/MP3/Worlds.txt") {
        let mut s = String::new();
        partition
            .open_file(node)
            .expect("Failed to open file stream")
            .read_to_string(&mut s)
            .expect("Failed to read file");
        println!("{}", s);
    }
    Ok(())
}

Macros§

Structs§

Enums§

Constants§

Traits§

Type Aliases§