Struct ISO9660

Source
pub struct ISO9660<T: ISO9660Reader> { /* private fields */ }
Expand description

Struct representing an ISO 9660 / ECMA-119 filesystem.

Implementations§

Source§

impl<T: ISO9660Reader> ISO9660<T>

Source

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)?;
Source

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")?;
Source

pub fn is_rr(&self) -> bool

Returns true if Rock Ridge extensions are present

Source

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

Source

pub fn root_at(&self, index: usize) -> Option<&ISODirectory<T>>

Returns the root directory entry.

§Arguments
  • index - An integer indicating which root entry to return
    • 0 = primary
    • 1 = secondary (if not present, None is returned)
§See Also

ISO-9660 / ECMA-119 §§ 8.4, 8.5

Source

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

Source

pub fn volume_set_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.13

Source

pub fn publisher_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.14

Source

pub fn data_preparer_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.15

Source

pub fn application_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.16

Source

pub fn copyright_file_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.17

Source

pub fn abstract_file_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.18

Source

pub fn bibliographic_file_identifier(&self) -> &str

§See Also

ISO-9660 / ECMA-119 § 8.5.19

Auto Trait Implementations§

§

impl<T> Freeze for ISO9660<T>

§

impl<T> !RefUnwindSafe for ISO9660<T>

§

impl<T> !Send for ISO9660<T>

§

impl<T> !Sync for ISO9660<T>

§

impl<T> Unpin for ISO9660<T>

§

impl<T> !UnwindSafe for ISO9660<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.