Struct cdfs::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> !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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.