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
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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