pub struct IgnoreSet {
pub base: PathBuf,
/* private fields */
}Expand description
Compiled ignore rules for one directory tree root (the dir that held the file).
Fields§
§base: PathBufDirectory that contained the ignore file(s); patterns are relative to this.
Implementations§
Source§impl IgnoreSet
impl IgnoreSet
Sourcepub fn load_for_dir(dir: &Path) -> Self
pub fn load_for_dir(dir: &Path) -> Self
Load .f00ignore then .gitignore from dir (later files append; last match wins
for negation, same as layered gitignore sources in one directory).
pub fn is_empty(&self) -> bool
Sourcepub fn ignores(&self, entry: &Entry) -> bool
pub fn ignores(&self, entry: &Entry) -> bool
Return true if entry should be hidden by this ignore set.
Matching is performed against the path relative to Self::base, using
the entry name when the entry lives directly under base.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IgnoreSet
impl RefUnwindSafe for IgnoreSet
impl Send for IgnoreSet
impl Sync for IgnoreSet
impl Unpin for IgnoreSet
impl UnsafeUnpin for IgnoreSet
impl UnwindSafe for IgnoreSet
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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