[−][src]Struct broot::file_sum::FileSum
Reduction of counts, dates and sizes on a file or directory
Implementations
impl FileSum
[src]
pub fn new(real_size: u64, sparse: bool, count: usize, modified: u32) -> Self
[src]
pub fn zero() -> Self
[src]
pub fn incr(&mut self)
[src]
pub fn from_file(path: &Path) -> Self
[src]
return the sum of the given file, which is assumed to be a normal file (ie not a directory)
pub fn from_dir(path: &Path, dam: &Dam) -> Option<Self>
[src]
Return the sum of the directory, either by computing it of by fetching it from cache. If the lifetime expires before complete computation, None is returned.
pub fn part_of_size(self, total: Self) -> f32
[src]
pub fn to_count(self) -> usize
[src]
return the number of files (normally at least 1)
pub fn to_seconds(self) -> u32
[src]
return the number of seconds from Epoch to last modification, or 0 if the computation failed
pub fn to_size(self) -> u64
[src]
return the size in bytes
pub fn to_valid_seconds(self) -> Option<i64>
[src]
pub fn is_sparse(self) -> bool
[src]
tell whether the file has holes (in which case the size displayed by other tools may be greater than the "real" one returned by broot). Not computed (return false) on windows or for directories.
Trait Implementations
impl AddAssign<FileSum> for FileSum
[src]
fn add_assign(&mut self, other: Self)
[src]
impl Clone for FileSum
[src]
impl Copy for FileSum
[src]
impl Debug for FileSum
[src]
Auto Trait Implementations
impl RefUnwindSafe for FileSum
impl Send for FileSum
impl Sync for FileSum
impl Unpin for FileSum
impl UnwindSafe for FileSum
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,