pub struct FileInfo {}Expand description
Infos about a file We read and keep tracks every displayable information about a file. Like in exa we don’t display the group.
Fields§
§path: PathBufFull path of the file
filename: StringFilename
size: u64size (nb of bytes) of the file
file_size: StringFile size as a String, already human formated.
dir_symbol: charFirst symbol displaying the kind of file.
permissions: StringStr formatted permissions like rwxr..rw.
owner: StringOwner name of the file.
group: StringGroup name of the file.
system_time: StringSystem time of last modification
is_selected: boolIs this file currently selected ?
file_kind: FileKindWhat kind of file is this ?
extension: StringExtension of the file. "" for a directory.
kind_format: StringA formated filename where the “kind” of file (directory, char device, block devive, fifo, socket, normal) is prepend to the name, allowing a “sort by kind” method.
Implementations§
source§impl FileInfo
impl FileInfo
sourcepub fn new(
direntry: &DirEntry,
users_cache: &Rc<UsersCache>
) -> FmResult<FileInfo>
pub fn new(
direntry: &DirEntry,
users_cache: &Rc<UsersCache>
) -> FmResult<FileInfo>
Reads every information about a file from its metadata and returs
a new FileInfo object if we can create one.
Trait Implementations§
source§impl SelectableContent<FileInfo> for PathContent
impl SelectableContent<FileInfo> for PathContent
Implement a selectable content for this struct.
This trait allows to navigate through a vector of element content_type.
It implements: is_empty, len, next, prev, selected.
selected returns an optional reference to the value.