pub struct File {Show 13 fields
pub abs_dir: PathBuf,
pub rel_dir: PathBuf,
pub file_depth: 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 file_ver: Option<String>,
pub link_data: Option<(PathBuf, FileKind)>,
}Fields§
§abs_dir: PathBuf§rel_dir: PathBuf§file_depth: 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>§file_ver: Option<String>§link_data: Option<(PathBuf, FileKind)>Implementations§
Source§impl File
impl File
pub fn new( abs_dir: PathBuf, rel_dir: PathBuf, file_depth: usize, file_name: String, file_ext: String, file_type: FileKind, ) -> File
pub fn with_mode(self, file_mode: u32) -> File
pub fn with_owner( self, owner_user: Option<Rc<String>>, owner_group: Option<Rc<String>>, ) -> File
pub fn with_owner_ref(self, owner_user: &str, owner_group: &str) -> File
pub fn with_size(self, file_size: u64) -> File
pub fn with_time(self, file_time: DateTime<Utc>) -> File
pub fn with_version(self, file_ver: String) -> File
pub fn with_link(self, link_path: PathBuf, link_type: FileKind) -> File
pub fn get_path(&self) -> PathBuf
pub fn select_dir(&self, abs_path: bool) -> &Path
pub fn select_parent_for_indent(&self) -> Option<&Path>
pub fn select_name_for_indent(&self) -> Option<&str>
pub fn group_dir_before_file(&self) -> u8
Trait Implementations§
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> 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.