Struct DirEntry

Source
pub struct DirEntry<'a> {
Show 19 fields pub filename: Option<&'a TStr>, pub short_name: Option<&'a TStr>, pub full_path: &'a TStr, pub depth: usize, pub security_descriptor: Option<SECURITY_DESCRIPTOR_RELATIVE>, pub file_attributes: FileAttributes, pub reparse_tag: ReparseTag, pub num_links: u32, pub num_named_streams: u32, pub hard_link_group_id: u64, pub creation_time: OffsetDateTime, pub last_write_time: OffsetDateTime, pub last_access_time: OffsetDateTime, pub unix_uid: u32, pub unix_gid: u32, pub unix_mode: u32, pub unix_rdev: u32, pub object_id: ObjectId, pub streams: &'a [LazyStreamEntry<'a>],
}
Expand description

Structure passed to the Image::iterate_dir_tree’s callback function

Roughly, the information about a »file« in the WIM image — but really a directory entry (»dentry«) because hard links are allowed. The hard_link_group_id field can be used to distinguish actual file inodes.

Fields§

§filename: Option<&'a TStr>

Name of the file, or None if this file is unnamed

§short_name: Option<&'a TStr>

8.3 name (or »DOS name«, or »short name«) of this file; or None if this file has no such name

§full_path: &'a TStr

Full path to this file within the image

§depth: usize

Depth of this directory entry, where 0 is the root, 1 is the root’s children, …, etc

§security_descriptor: Option<SECURITY_DESCRIPTOR_RELATIVE>

Security descriptor for this file

§file_attributes: FileAttributes

File attributes, such as whether the file is a directory or not

§reparse_tag: ReparseTag

If the file is a reparse point (FileAttributes::REPARSE_POINT set in the attributes), this will give the reparse tag

§num_links: u32

Number of links to this file’s inode (hard links)

§num_named_streams: u32

Number of named data streams this file has

§hard_link_group_id: u64

A unique identifier for this file’s inode

§creation_time: OffsetDateTime

Time this file was created

§last_write_time: OffsetDateTime

Time this file was last written to

§last_access_time: OffsetDateTime

Time this file was last accessed

§unix_uid: u32

The UNIX user ID of this file

§unix_gid: u32

The UNIX group ID of this file

§unix_mode: u32

The UNIX mode of this file

§unix_rdev: u32

The UNIX device ID (major and minor number) of this file

§object_id: ObjectId

Object’s ID

§streams: &'a [LazyStreamEntry<'a>]

File’s stream entries

Implementations§

Source§

impl<'a> DirEntry<'a>

Source

pub fn streams_converted(&self) -> Rc<[StreamEntry<'a>]>

Get evaluated streams

Source

pub unsafe fn from_raw(ffi: *const wimlib_dir_entry) -> Self

§Safety
  • ffi has to be valid pointer to underlying data

Trait Implementations§

Source§

impl<'a> Clone for DirEntry<'a>

Source§

fn clone(&self) -> DirEntry<'a>

Returns a duplicate 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<'a> Debug for DirEntry<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DirEntry<'a>

§

impl<'a> RefUnwindSafe for DirEntry<'a>

§

impl<'a> !Send for DirEntry<'a>

§

impl<'a> !Sync for DirEntry<'a>

§

impl<'a> Unpin for DirEntry<'a>

§

impl<'a> UnwindSafe for DirEntry<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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 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.