pub struct Directory {
pub path: PathBuf,
pub uid: u32,
pub gid: u32,
pub mode: String,
pub time: i64,
}Expand description
A directory type path statement in an mtree file.
Fields§
§path: PathBufThe path of the directory.
uid: u32The user ID of the directory.
gid: u32The group ID of the directory.
mode: StringThe file mode of the directory.
time: i64The modification time of the directory in seconds since the epoch.
Implementations§
Source§impl Directory
impl Directory
Sourcepub fn equals_path(
&self,
input_path: &InputPath<'_, '_>,
) -> Result<(), Vec<PathValidationError>>
pub fn equals_path( &self, input_path: &InputPath<'_, '_>, ) -> Result<(), Vec<PathValidationError>>
Checks whether InputPath equals self.
More specifically, checks that
MTREE_PATH_PREFIXcan be stripped fromself.path,InputPath::pathand the strippedself.pathmatch,InputPath::to_path_bufexists,- metadata can be retrieved for
InputPath::to_path_buf, InputPath::to_path_bufis a directory,- the modification time of
InputPath::to_path_bufmatches that ofself.time, - the UID of
InputPath::to_path_bufmatches that ofself.uid, - the GID of
InputPath::to_path_bufmatches that ofself.gid, - the mode of
InputPath::to_path_bufmatches that ofself.mode.
§Errors
Returns a list of PathValidationErrors if issues have been found during validation of
input_path.
Trait Implementations§
Source§impl Ord for Directory
impl Ord for Directory
Source§impl PartialOrd for Directory
impl PartialOrd for Directory
impl Eq for Directory
impl StructuralPartialEq for Directory
Auto Trait Implementations§
impl Freeze for Directory
impl RefUnwindSafe for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnwindSafe for Directory
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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