pub struct Entry {Show 17 fields
pub name: PathStr,
pub kind: FileType,
pub mtime: Time,
pub mode: Mode,
pub user: User,
pub group: Group,
pub size: u64,
pub inode: Option<u64>,
pub nlink: Option<u64>,
pub device: Option<Device>,
pub special_device: Option<Device>,
pub checksums: Option<Vec<Checksum>>,
pub ctime: Option<Time>,
pub atime: Option<Time>,
pub btime: Option<Time>,
pub link_target: Option<String>,
pub link_real: Option<String>,
}Fields§
§name: PathStrThe entry’s file path
kind: FileTypeThe type of the file
Depending on the file type, entries may automatically make use of (or disregard entirely) certain fields. For example:
Directories,symlinks,sockets,character/blockspecial and named pipes do not yield asizefields- Only files which are character/block special yield
device.specialfields
mtime: TimeTime of the file’s last ‘modification’
Represents the last time the actual content of the file was modified, e.g.: it was written/appended to, truncated, etc
mode: ModeThe file’s mode/permissions
user: UserThe file’s owning user
group: GroupThe file’s owning group
size: u64§inode: Option<u64>The file’s inode number
nlink: Option<u64>Number of hard links
device: Option<Device>The device the file is on
special_device: Option<Device>The special device (character/block) if applicable
checksums: Option<Vec<Checksum>>Hashes of the file
ctime: Option<Time>Time of the file’s last ‘change’
Unlike mtime, which tracks file content updates,
ctime is updated whenever permissions/ownership (chmod/chown), extended
attributes, link count (nlink) or the file’s path/location change.
atime: Option<Time>Time of the file’s last access
btime: Option<Time>Time of the file’s creation
link_target: Option<String>If the file is a symlink, the target of the link
link_real: Option<String>If the file is a symlink, the fully resolved target path
This is likely to point outside of the directory tree
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn new<P>(file: P, conf: Option<&EntryConfig>) -> Result<Self, Error>
pub fn new<P>(file: P, conf: Option<&EntryConfig>) -> Result<Self, Error>
Create a new entry given a path and optionally a configration
Sourcepub fn compare<P>(
&self,
path: P,
conf: Option<&EntryConfig>,
) -> Result<Comparison, Error>
pub fn compare<P>( &self, path: P, conf: Option<&EntryConfig>, ) -> Result<Comparison, Error>
Check this entry against an on-disk file, yielding a Comparison between them
Trait Implementations§
impl Eq for Entry
Source§impl Ord for Entry
impl Ord for Entry
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Entry
impl PartialOrd for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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
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> ⓘ
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> ⓘ
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