pub struct FileMeta {Show 21 fields
pub path: PathBuf,
pub name: String,
pub is_dir: bool,
pub is_symlink: bool,
pub link_target: Option<PathBuf>,
pub size: u64,
pub mode: u32,
pub permissions: Permissions,
pub uid: u32,
pub gid: u32,
pub owner: String,
pub group: String,
pub owner_name: Option<String>,
pub group_name: Option<String>,
pub nlink: u64,
pub inode: u64,
pub mime_type: Option<String>,
pub type_description: Option<String>,
pub accessed: Option<SystemTime>,
pub modified: Option<SystemTime>,
pub created: Option<SystemTime>,
}Expand description
A stat(2) snapshot of one path, with the presentation-friendly fields the
Properties dialog needs already resolved.
Fields§
§path: PathBuf§name: String§is_dir: bool§is_symlink: bool§link_target: Option<PathBuf>The link target, when is_symlink.
size: u64Size in bytes (the link’s own size for a symlink).
mode: u32The mode a chmod would read/write. For a symlink this is the target’s
mode when it resolves, else the link’s.
permissions: Permissions§uid: u32§gid: u32§owner: StringResolved user/group names, or the numeric id when unresolvable.
group: String§owner_name: Option<String>§group_name: Option<String>§nlink: u64§inode: u64§mime_type: Option<String>§type_description: Option<String>§accessed: Option<SystemTime>§modified: Option<SystemTime>§created: Option<SystemTime>Implementations§
Source§impl FileMeta
impl FileMeta
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
The name shown in dialog titles and headers.
Sourcepub fn item_count(&self) -> Option<u64>
pub fn item_count(&self) -> Option<u64>
The stat size, or — for a directory — the number of entries in it.
Counting is best-effort; an unreadable directory yields None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileMeta
impl RefUnwindSafe for FileMeta
impl Send for FileMeta
impl Sync for FileMeta
impl Unpin for FileMeta
impl UnsafeUnpin for FileMeta
impl UnwindSafe for FileMeta
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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