pub struct DirectoryEntry { /* private fields */ }Expand description
One enumerated directory entry with its full inline metadata.
Names are the entry’s own leaf name – never a path – and stay native-width WTF-16, so an ill-formed surrogate a filesystem happens to contain survives the round trip rather than being replaced.
Implementations§
Source§impl DirectoryEntry
impl DirectoryEntry
Sourcepub fn into_name(self) -> Wtf16String
pub fn into_name(self) -> Wtf16String
Take ownership of the name, consuming the entry.
Sourcepub const fn entry_type(&self) -> EntryType
pub const fn entry_type(&self) -> EntryType
Whether the entry is a directory or a file.
Sourcepub const fn attributes(&self) -> u32
pub const fn attributes(&self) -> u32
The raw FILE_ATTRIBUTE_* bitmask, exactly as the record reported it.
Sourcepub const fn is_reparse_point(&self) -> bool
pub const fn is_reparse_point(&self) -> bool
Whether the entry is a reparse point.
Sourcepub const fn reparse_tag(&self) -> Option<u32>
pub const fn reparse_tag(&self) -> Option<u32>
The reparse tag, present exactly when the entry is a reparse point.
Sourcepub const fn logical_size(&self) -> u64
pub const fn logical_size(&self) -> u64
The end-of-file offset in bytes: how much data the entry holds.
Sourcepub const fn allocation_size(&self) -> u64
pub const fn allocation_size(&self) -> u64
The bytes allocated on the volume, which may exceed or – for a compressed or sparse file – fall short of the logical size.
Sourcepub const fn extended_attribute_size(&self) -> u32
pub const fn extended_attribute_size(&self) -> u32
The size of the entry’s extended attributes, in bytes.
Sourcepub const fn creation_time(&self) -> WindowsFileTimestamp
pub const fn creation_time(&self) -> WindowsFileTimestamp
When the entry was created.
Sourcepub const fn last_access_time(&self) -> WindowsFileTimestamp
pub const fn last_access_time(&self) -> WindowsFileTimestamp
When the entry was last accessed.
Sourcepub const fn last_write_time(&self) -> WindowsFileTimestamp
pub const fn last_write_time(&self) -> WindowsFileTimestamp
When the entry’s data was last written.
Sourcepub const fn change_time(&self) -> WindowsFileTimestamp
pub const fn change_time(&self) -> WindowsFileTimestamp
When the entry’s metadata last changed.
This has no WIN32_FIND_DATAW equivalent; it is one of the fields that
makes the extended directory-information class worth requiring.
Sourcepub const fn identity(&self) -> FileIdentity
pub const fn identity(&self) -> FileIdentity
The entry’s identity, volume-qualified only if the request asked for it.
Trait Implementations§
Source§impl Clone for DirectoryEntry
impl Clone for DirectoryEntry
Source§fn clone(&self) -> DirectoryEntry
fn clone(&self) -> DirectoryEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more