pub struct FileNode {Show 22 fields
pub path: PathBuf,
pub is_dir: bool,
pub size: u64,
pub permissions: u32,
pub uid: u32,
pub gid: u32,
pub modified: SystemTime,
pub is_symlink: bool,
pub is_hidden: bool,
pub permission_denied: bool,
pub is_ignored: bool,
pub depth: usize,
pub file_type: FileType,
pub category: FileCategory,
pub search_matches: Option<SearchMatches>,
pub filesystem_type: FilesystemType,
pub git_branch: Option<String>,
pub traversal_context: Option<TraversalContext>,
pub interest: Option<InterestScore>,
pub security_findings: Vec<SecurityFinding>,
pub change_status: Option<ChangeType>,
pub content_hash: Option<String>,
}Expand description
§FileNode: The Ultimate Backstage Pass
Every file and directory we meet gets one of these. It’s a VIP pass that
holds all the juicy details: its name, size, when it was last cool (modified),
and whether it’s on the super-secret “ignored” list. It’s the atom of our
st universe.
Fields§
§path: PathBufThe full path to the file or directory. The source of truth for location!
is_dir: boolIs it a directory? true if yes, false if it’s a file or symlink.
size: u64Size of the file in bytes. For directories, this is often 0 or metadata-dependent.
permissions: u32File permissions (e.g., rwxr-xr-x). Stored as a u32, typically from Unix mode.
uid: u32User ID of the owner (Unix-specific).
gid: u32Group ID of the owner (Unix-specific).
modified: SystemTimeTimestamp of the last modification. Tells us how fresh or ancient a file is.
is_symlink: boolIs it a symbolic link? true if yes. We handle these with care.
Is it a hidden file (e.g., starts with a . on Unix)?
permission_denied: boolDid we encounter a “Permission Denied” error when trying to access this? Important for gracefully handling parts of the filesystem we can’t read.
is_ignored: boolIs this file or directory ignored based on .gitignore or default ignore rules?
depth: usizeThe depth of this entry relative to the scan root (root is depth 0).
file_type: FileTypeThe specific type of the file (e.g., RegularFile, Symlink, Executable).
category: FileCategoryA category assigned based on extension or name, used for coloring and context. (e.g., Rust, Python, Image, Archive).
search_matches: Option<SearchMatches>For content search: Information about where matches were found
None if no search was performed or no matches.
filesystem_type: FilesystemTypeThe filesystem type this file resides on
git_branch: Option<String>Git branch if this directory contains a .git folder
traversal_context: Option<TraversalContext>How we reached this location (direct, symlink, mount, dependency)
interest: Option<InterestScore>Interest score - how relevant is this file right now?
security_findings: Vec<SecurityFinding>Security findings detected during scan
change_status: Option<ChangeType>Change status since last scan (Added, Modified, Deleted, etc.)
content_hash: Option<String>Content hash for change detection (Blake3/SHA256)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileNode
impl<'de> Deserialize<'de> for FileNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for FileNode
impl RefUnwindSafe for FileNode
impl Send for FileNode
impl Sync for FileNode
impl Unpin for FileNode
impl UnsafeUnpin for FileNode
impl UnwindSafe for FileNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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