Struct nx::file::File
[−]
[src]
pub struct File { /* fields omitted */ }
A memory-mapped NX file.
Methods
impl File
[src]
fn open(path: &Path) -> Result<File, Error>
Opens an NX file via memory-mapping. This also checks the magic bytes in the header.
fn node_count(&self) -> u32
Number of nodes in the file
fn root<'a>(&'a self) -> Node<'a>
Gets the root node of the file.
unsafe fn get_str(&self, index: u32) -> &str
Gets the string at the specified index in the string table.
unsafe fn get_node(&self, index: u32) -> &Node
Gets the node data at the specified index in the node table.
unsafe fn get_audio(&self, index: u32, length: u32) -> &[u8]
Gets the audio data at the specified index in the node table.