Struct broot::file_sum::FileSum [−][src]
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, con: &AppContext) -> 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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,