pub struct VTCodeGitignore { /* private fields */ }
Expand description
Represents a .vtcodegitignore file with pattern matching capabilities
Implementations§
Source§impl VTCodeGitignore
impl VTCodeGitignore
Sourcepub async fn new() -> Result<Self>
pub async fn new() -> Result<Self>
Create a new VTCodeGitignore instance by looking for .vtcodegitignore in the current directory
Sourcepub async fn from_directory(root_dir: &Path) -> Result<Self>
pub async fn from_directory(root_dir: &Path) -> Result<Self>
Create a VTCodeGitignore instance from a specific directory
Sourcepub fn should_exclude(&self, file_path: &Path) -> bool
pub fn should_exclude(&self, file_path: &Path) -> bool
Check if a file path should be excluded based on the .vtcodegitignore patterns
Sourcepub fn filter_paths(&self, paths: Vec<PathBuf>) -> Vec<PathBuf>
pub fn filter_paths(&self, paths: Vec<PathBuf>) -> Vec<PathBuf>
Filter a list of file paths based on .vtcodegitignore patterns
Sourcepub fn pattern_count(&self) -> usize
pub fn pattern_count(&self) -> usize
Get the number of patterns loaded
Trait Implementations§
Source§impl Clone for VTCodeGitignore
impl Clone for VTCodeGitignore
Source§fn clone(&self) -> VTCodeGitignore
fn clone(&self) -> VTCodeGitignore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VTCodeGitignore
impl Debug for VTCodeGitignore
Auto Trait Implementations§
impl Freeze for VTCodeGitignore
impl RefUnwindSafe for VTCodeGitignore
impl Send for VTCodeGitignore
impl Sync for VTCodeGitignore
impl Unpin for VTCodeGitignore
impl UnwindSafe for VTCodeGitignore
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> 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>
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