pub struct DirEntry {
pub name: String,
pub object_type: Option<ObjectType>,
pub size: Option<u64>,
pub alloc_size: Option<u64>,
pub modified_time: Option<SystemTime>,
pub permissions: Option<u32>,
pub inode: Option<u64>,
pub entry_count: Option<u32>,
}Expand description
Metadata for a single directory entry.
§String Handling
The name field uses lossy UTF-8 conversion. If a filename contains
invalid UTF-8 sequences (rare on macOS but possible), invalid bytes
are replaced with the Unicode replacement character (U+FFFD).
Fields§
§name: StringFile or directory name
object_type: Option<ObjectType>Object type
size: Option<u64>Total size in bytes
alloc_size: Option<u64>Allocated size on disk
modified_time: Option<SystemTime>Last modification time
permissions: Option<u32>Unix permissions mask
inode: Option<u64>Inode number / file ID
entry_count: Option<u32>Entry count (directories only)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirEntry
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl UnwindSafe for DirEntry
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
Mutably borrows from an owned value. Read more