Skip to content
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.

For attribute filtering, the AttrSearchType enumeration and bitwise attributes passed to the constructor dictates the filtering used. AttrSearchType follows:

  1. stExact: The EXACT combination of attributes on the file must match.
    One common example of misuse: If you are looking for hidden + system files, but the file also has archive, it would be excluded. In this case, you would likely want to use stAll.
  2. stAll: All of the attributes must match. Any extra file attributes are ignored and the file is considered matched.
  3. 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

Clone this wiki locally