pub struct DirInfo {
pub filetypes: HashMap<String, FileType>,
pub files: Vec<File>,
pub files_by_size: Vec<File>,
pub types_by_size: Vec<FileType>,
pub dirs_by_size: Vec<Directory>,
pub tree: HashMap<PathBuf, Directory>,
pub combined_size: u64,
pub duplicates: HashMap<u64, Vec<File>>,
}
Expand description
A DirInfo holds all info about a directory.
Fields§
§filetypes: HashMap<String, FileType>
All file types
files: Vec<File>
§files_by_size: Vec<File>
Files, ordered by size, descending
types_by_size: Vec<FileType>
Filetypes, ordered by size, descending
dirs_by_size: Vec<Directory>
Directories, ordered by size
tree: HashMap<PathBuf, Directory>
§combined_size: u64
Cumulated size
duplicates: HashMap<u64, Vec<File>>
All duplicates
Implementations§
Source§impl DirInfo
impl DirInfo
Sourcepub fn types_by_size(&self) -> Vec<FileType>
pub fn types_by_size(&self) -> Vec<FileType>
Return file types, ordered by size
Sourcepub fn files_by_size(&self) -> Vec<File>
pub fn files_by_size(&self) -> Vec<File>
Return all files, ordered by size
Sourcepub fn dirs_by_size(&self) -> Vec<Directory>
pub fn dirs_by_size(&self) -> Vec<Directory>
Return all directories, ordered by size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirInfo
impl RefUnwindSafe for DirInfo
impl Send for DirInfo
impl Sync for DirInfo
impl Unpin for DirInfo
impl UnwindSafe for DirInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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