pub struct DirInfo {
pub path: Arc<str>,
pub files: Vec<FileInfo>,
pub dirs: Vec<DirInfo>,
}Fields§
§path: Arc<str>§files: Vec<FileInfo>§dirs: Vec<DirInfo>Implementations§
source§impl DirInfo
impl DirInfo
sourcepub fn is_empty_dir(&self) -> bool
pub fn is_empty_dir(&self) -> bool
递归判断文件夹和子文件夹里是否为空
sourcepub fn cut_empty_dir(&mut self)
pub fn cut_empty_dir(&mut self)
递归删除空的子文件夹
pub fn all_files_map<F, T>(&self, f: F) -> Vec<T>where F: Fn(&FileInfo) -> T, T: FromIterator<T>,
sourcepub fn all_files_str(&self) -> Vec<String>
👎Deprecated since 0.2.0: replace with all_files_map() or all_files()
pub fn all_files_str(&self) -> Vec<String>
sourcepub fn all_files_abs(&self) -> Vec<String>
pub fn all_files_abs(&self) -> Vec<String>
返回所有文件的绝对路径名
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DirInfo
impl Send for DirInfo
impl Sync for DirInfo
impl Unpin for DirInfo
impl UnwindSafe for DirInfo
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