pub struct DirTree {
pub children: HashMap<PathBuf, Arc<Vec<DirEntry>>>,
/* private fields */
}Fields§
§children: HashMap<PathBuf, Arc<Vec<DirEntry>>>Implementations§
Source§impl DirTree
impl DirTree
Sourcepub fn build_with_progress(
root: &Path,
matcher: &PatternMatcher,
progress: Arc<ScanProgress>,
cancelled: Arc<AtomicBool>,
force: bool,
) -> Self
pub fn build_with_progress( root: &Path, matcher: &PatternMatcher, progress: Arc<ScanProgress>, cancelled: Arc<AtomicBool>, force: bool, ) -> Self
Build tree with SINGLE WalkDir pass - maximum performance
Source§impl DirTree
impl DirTree
pub fn from_children(children: HashMap<PathBuf, Vec<DirEntry>>) -> Self
pub fn get_children(&mut self, path: &Path, by_name: bool) -> Arc<Vec<DirEntry>> ⓘ
Sourcepub fn delete_entry(&mut self, path: &PathBuf, is_dir: bool)
pub fn delete_entry(&mut self, path: &PathBuf, is_dir: bool)
Remove entry from the tree and update all parent sizes (O(depth))
pub fn get_temp_stats(&self, dir: &Path) -> (usize, usize, u64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirTree
impl RefUnwindSafe for DirTree
impl Send for DirTree
impl Sync for DirTree
impl Unpin for DirTree
impl UnsafeUnpin for DirTree
impl UnwindSafe for DirTree
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