pub struct FileTreeFilter {
pub show_hidden: bool,
pub builtin_excludes: bool,
pub extra_excludes: Vec<String>,
pub include: Vec<String>,
pub respect_gitignore: bool,
}Expand description
Filter options controlling which entries appear in FileTreeView.
§Defaults
show_hidden = false— hide dotfiles / dot-directories.builtin_excludes = true— hide known build-output directories.extra_excludes = []— no additional exclusions.include = []— include everything (no inclusion filter).respect_gitignore = false— do not parse.gitignorefiles.
The defaults are intentionally conservative: they hide the noise without requiring any configuration for the common case.
Fields§
When false, entries whose name starts with . are excluded.
builtin_excludes: boolWhen true, entries whose name appears in BUILTIN_EXCLUDES
are excluded.
extra_excludes: Vec<String>Glob patterns for additional exclusions (RFC 019).
Each entry is a globset glob pattern matched against the entry’s
file_name() component only (not the full path). A trailing /
restricts the pattern to directories.
Breaking change from pre-5.11: Previously these were exact-name matches. Now they are glob patterns. Literal names continue to work because a bare name with no metacharacters is a valid glob.
include: Vec<String>If non-empty, only files whose name matches at least one pattern (glob) are included. Directories are always kept so the user can drill into them.
respect_gitignore: boolWhen true, parse .gitignore files at the directory being listed
and in its ancestors (up to the nearest .git directory), applying
the same ignore rules Git would (RFC 019). Off by default.
Trait Implementations§
Source§impl Clone for FileTreeFilter
impl Clone for FileTreeFilter
Source§fn clone(&self) -> FileTreeFilter
fn clone(&self) -> FileTreeFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more