[enhancement] - Find module - Adding directory exclusion logic with depth-based exclusion control #107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces the implementation of directory exclusion logic with depth-based control in the
find
method inSMBSession.py
and the Find module.Key Features:
--exclude-dir
option. The exclusion comparison is case-sensitive.--exclude-dir-depth
parameter allows you to specify at which depth directories should be excluded:0
: Excludes directories at the initial level (default behavior).-1
: Exclude directories at all levels, ensuring directories are skipped regardless of their depth in the hierarchy.Use Case:
This feature allows users to fine-tune their searches by excluding specific directories at different levels of the directory structure. It is particularly useful when performing searches across deep directory hierarchies, giving users more control over which directories are included or excluded during the search.