-
Notifications
You must be signed in to change notification settings - Fork 0
Home
MH edited this page Jan 4, 2019
·
13 revisions
DirSearch is a C# Class Library for directory searching and filtering.
Notes:
- Filtering is supported by using traditional wildcard-matching, but also by file attributes.
- File security is enforced as expected through .net and Windows security.
- Delegates (callbacks) can be used by the caller for every file, folder, and/or file-traversal exceptions. This can be used for progress indicators, logging, etc.
- Reparse points and temporary files are always skipped.
For attribute filtering, the AttrSearchType enumeration and bitwise attributes passed to the constructor dictates the filtering used. AttrSearchType follows:
-
stExact: The EXACT combination of attributes on the file must match.
One common example of misuse: when looking for hidden + system files and the file also has the archive attribute set, the file would be excluded. In this case, you would likely want to usestAllinstead. -
stAll: All of the attributes must match. Any extra file attributes are ignored and the file is considered matched. -
stAny: (default) Any of the attributes may match. You just need one or more matches.
Currently targets .Net Standard 2.0 and .Net Framework 4.6.1. To use the NuGet package, refer to: OCSS.Util.DirSearch