pub struct File {Show 15 fields
pub abs_dir: PathBuf,
pub rel_dir: PathBuf,
pub file_depth: usize,
pub zip_depth: Option<usize>,
pub file_name: String,
pub file_ext: String,
pub file_type: FileKind,
pub file_mode: u32,
pub owner_user: Option<Rc<String>>,
pub owner_group: Option<Rc<String>>,
pub file_size: u64,
pub file_time: DateTime<Utc>,
pub git_flags: Option<GitFlags>,
pub file_sig: Signature,
pub link_data: Option<(PathBuf, FileKind)>,
}
Fields§
§abs_dir: PathBuf
§rel_dir: PathBuf
§file_depth: usize
§zip_depth: Option<usize>
§file_name: String
§file_ext: String
§file_type: FileKind
§file_mode: u32
§owner_user: Option<Rc<String>>
§owner_group: Option<Rc<String>>
§file_size: u64
§file_time: DateTime<Utc>
§git_flags: Option<GitFlags>
§file_sig: Signature
§link_data: Option<(PathBuf, FileKind)>
Implementations§
Source§impl File
impl File
pub fn new( abs_dir: PathBuf, rel_dir: PathBuf, file_depth: usize, zip_depth: Option<usize>, file_name: String, file_ext: String, file_type: FileKind, ) -> Self
pub fn with_mode(self, file_mode: u32) -> Self
pub fn with_owner( self, owner_user: Option<Rc<String>>, owner_group: Option<Rc<String>>, ) -> Self
pub fn with_size(self, file_size: u64) -> Self
pub fn with_time(self, file_time: DateTime<Utc>) -> Self
pub fn with_git(self, git_flags: Option<GitFlags>) -> Self
pub fn with_sig(self, file_sig: Option<Signature>) -> Self
pub fn with_link(self, link_path: PathBuf, link_type: FileKind) -> Self
pub fn get_path(&self) -> PathBuf
pub fn select_dir(&self, abs_path: bool) -> &Path
pub fn select_parent_for_indent(&self) -> Option<PathBuf>
pub fn group_dir_before_file(&self) -> u8
Trait Implementations§
Source§impl Ord for File
impl Ord for File
Source§impl PartialOrd for File
impl PartialOrd for File
impl Eq for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl !Send for File
impl !Sync for File
impl Unpin for File
impl UnwindSafe for File
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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