pub struct TreeEntry {
pub path: PathBuf,
pub name: String,
pub is_dir: bool,
pub is_symlink: bool,
pub symlink_target: Option<PathBuf>,
pub metadata: Option<Metadata>,
pub children: Vec<TreeEntry>,
pub error: Option<String>,
}Expand description
Represents a single entry in the directory tree
Fields§
§path: PathBuf§name: String§is_dir: bool§is_symlink: bool§symlink_target: Option<PathBuf>§metadata: Option<Metadata>§children: Vec<TreeEntry>§error: Option<String>Implementations§
Source§impl TreeEntry
impl TreeEntry
pub fn new(path: PathBuf) -> Self
Sourcepub fn modified(&self) -> Option<SystemTime>
pub fn modified(&self) -> Option<SystemTime>
Get modification time
Sourcepub fn permissions_string(&self) -> String
pub fn permissions_string(&self) -> String
Get file permissions as a string (e.g., “drwxr-xr-x”)
Sourcepub fn is_executable(&self) -> bool
pub fn is_executable(&self) -> bool
Check if this is an executable file
Sourcepub fn type_indicator(&self) -> &'static str
pub fn type_indicator(&self) -> &'static str
Get the type indicator character (like ls -F)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeEntry
impl RefUnwindSafe for TreeEntry
impl Send for TreeEntry
impl Sync for TreeEntry
impl Unpin for TreeEntry
impl UnwindSafe for TreeEntry
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