Enum cdfs::DirectoryEntry

source ·
pub enum DirectoryEntry<T: ISO9660Reader> {
    Directory(ISODirectory<T>),
    File(ISOFile<T>),
    Symlink(Symlink),
}
Expand description

An entry inside of a directory on the filesystem. Returned by the ISODirectoryIterator iterator.

Notes

ISO 9660 / ECMA-119 define other common unix types such as sockets, pipes, and devices. Currently only regular files, directories, and symbolic links are supported.

Variants§

§

Directory(ISODirectory<T>)

Directory entry.

§

File(ISOFile<T>)

Regular file entry.

Symbolic link entry.

Implementations§

source§

impl<T: ISO9660Reader> DirectoryEntry<T>

source

pub fn identifier(&self) -> &str

Returns the name of the current DirectoryEntry.

Notes

ISO-9660 / ECMA-119 specify various restrictions on what characters are allowed in an identifier, and how long they can be. Joliet specifies UTF-16BE encoding for its alternative directory hierarchies. Finally, in Rust Strings use UTF-8. The way this works in practice is that we’re okay with identifiers that are UTF-8 or a subset thereof, unless a character encoding is explicitly specified (e.g. Joliet). If UTF-16 is specified, it is assumed to be big endian.

Trait Implementations§

source§

impl<T: Clone + ISO9660Reader> Clone for DirectoryEntry<T>

source§

fn clone(&self) -> DirectoryEntry<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: ISO9660Reader> Debug for DirectoryEntry<T>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ISO9660Reader> ExtraAttributes for DirectoryEntry<T>

source§

fn ext(&self) -> &ExtraMeta

Returns the ExtraMeta attached to the current object. Generally not something to be called directly.
source§

fn header(&self) -> &DirectoryEntryHeader

Returns the DirectoryEntryHeader attached to the current object. Generally not something to be called directly.
source§

fn relocated(&self) -> bool

Returns true if this directory has been relocated elsewhere to circumvent ISO 9660’s limits on directory depth. Read more
source§

fn time(&self) -> OffsetDateTime

Returns the ISO 9660 “recording” timestamp. Read more
source§

fn owner(&self) -> Option<u32>

Returns the file owner’s user ID (st_uid), if available. Read more
source§

fn group(&self) -> Option<u32>

Returns the file owner’s group ID (st_gid), if available. Read more
source§

fn mode(&self) -> Option<PosixFileMode>

Returns the file protection mode / Unix permissions (a.k.a. st_mode), if available. Read more
source§

fn access_time(&self) -> OffsetDateTime

Returns the last time the file contents were accessed (st_atime), if available. If there is no access time available, the value of time() is returned. Read more
source§

fn attribute_change_time(&self) -> OffsetDateTime

Returns the last time the attributes were changed (st_ctime), if available. If there is no ctime available, the value of time() is returned. Read more
source§

fn backup_time(&self) -> OffsetDateTime

Returns the last backup time, if available. If there is no backup time available, the value of time() is returned. Read more
source§

fn create_time(&self) -> OffsetDateTime

Returns the creation time, if available. If there is no creation time available, the value of time() is returned. Read more
source§

fn effective_time(&self) -> OffsetDateTime

Returns the effective time, if available. If there is no expiration time available, the value of time() is returned. Read more
source§

fn expire_time(&self) -> OffsetDateTime

Returns the expiration time, if available. If there is no expiration time available, the value of time() is returned. Read more
source§

fn modify_time(&self) -> OffsetDateTime

Returns the last modification time (st_mtime), if available. If there is no modification time available, the value of time() is returned. Read more
source§

fn inode(&self) -> Option<u32>

Returns the serial number (a.k.a. inode), if available. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for DirectoryEntry<T>

§

impl<T> !Send for DirectoryEntry<T>

§

impl<T> !Sync for DirectoryEntry<T>

§

impl<T> Unpin for DirectoryEntry<T>

§

impl<T> !UnwindSafe for DirectoryEntry<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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.