pub struct ISO9660<T: ISO9660Reader> { /* private fields */ }
Expand description
Struct representing an ISO 9660 / ECMA-119 filesystem.
Implementations§
source§impl<T: ISO9660Reader> ISO9660<T>
impl<T: ISO9660Reader> ISO9660<T>
sourcepub fn new(reader: T) -> Result<ISO9660<T>>
pub fn new(reader: T) -> Result<ISO9660<T>>
Returns a new ISO9660
instance from an ISO9660Reader
instance. ISO9660Reader
has
a blanket implementation for all types that implement Read
and
Seek
, so this function can be called with e.g. a File
or Cursor
.
Errors
Upon encountering an error parsing the filesystem image or an I/O error, an error variant will be returned.
Example
let file = File::open("images/test.iso")?;
let iso = ISO9660::new(file)?;
sourcepub fn open(&self, path: &str) -> Result<Option<DirectoryEntry<T>>>
pub fn open(&self, path: &str) -> Result<Option<DirectoryEntry<T>>>
Returns a DirectoryEntry
for a given path.
Arguments
path
- Path to the object on the filesystem
Errors
Upon encountering an I/O error or an error parsing the filesystem, an error variant is returned.
If the path cannot be found on the filesystem Ok(None)
is returned.
Example
let entry = iso.open("/README.TXT")?;
sourcepub fn root(&self) -> &ISODirectory<T>
pub fn root(&self) -> &ISODirectory<T>
Returns the most featureful root directory.
Root selection
- If the primary volume descriptor has Rock Ridge SUSP entries, use it
- ElseIf a supplementary volume descriptor (e.g. Joliet) exists, use it
- Else fall back on the primary volume descriptor with short filenames
See Also
ISO-9660 / ECMA-119 §§ 8.4, 8.5
sourcepub fn root_at(&self, index: usize) -> Option<&ISODirectory<T>>
pub fn root_at(&self, index: usize) -> Option<&ISODirectory<T>>
sourcepub fn block_size(&self) -> u16
pub fn block_size(&self) -> u16
Returns BLOCK_SIZE
.
This implementation hardcodes the block size to 2048.
See Also
ISO-9660 / ECMA-119 § 6.1.2
sourcepub fn volume_set_identifier(&self) -> &str
pub fn volume_set_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.13
sourcepub fn publisher_identifier(&self) -> &str
pub fn publisher_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.14
sourcepub fn data_preparer_identifier(&self) -> &str
pub fn data_preparer_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.15
sourcepub fn application_identifier(&self) -> &str
pub fn application_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.16
sourcepub fn copyright_file_identifier(&self) -> &str
pub fn copyright_file_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.17
sourcepub fn abstract_file_identifier(&self) -> &str
pub fn abstract_file_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.18
sourcepub fn bibliographic_file_identifier(&self) -> &str
pub fn bibliographic_file_identifier(&self) -> &str
See Also
ISO-9660 / ECMA-119 § 8.5.19