Summary
Maintains a selection of paths in the filesystem and offers methods for enumerating all the included paths and/or
files.
Remarks
Initially empty. Paths may be added to the set (with all subpaths) by calling PathManager.AddIncludePath(string), and
removed from the set using PathManager.AddExcludePath(string) (again, with subpaths). The order of these calls is
important.
There is currently no support for including or excluding non-recursively, nor for including/excluding specific
files.
Constructors
| Constructs an empty instance. |
| Constructs an instance containing all of the specified paths (with all subpaths). |
|
Instance methods
void | |
Makes the specified path and all subpaths excluded from the set of paths. |
void | |
Makes the specified path and all subpaths included into the set of paths. |
PathManager | | Creates a deep clone of this class. |
PathManager | | A synonym for PathManager.AddExcludePath(string), only chainable (returns this ). |
IEnumerable<DirectoryInfo> | |
Enumerates all directories (not files) according to the paths that were added using PathManager.AddIncludePath(string)
and PathManager.AddExcludePath(string). If any paths cannot be enumerated, they are added to the PathManager.FailedFiles list, which is cleared before enumeration begins. |
IEnumerable<FileSystemInfo> | |
Enumerates all files and directories according to the paths that were added using PathManager.AddIncludePath(string) and
PathManager.AddExcludePath(string). If any paths cannot be enumerated, they are added to the PathManager.FailedFiles
list, which is cleared before enumeration begins. |
IEnumerable<FileInfo> | |
Enumerates all files (not folders) according to the paths that were added using PathManager.AddIncludePath(string) and
PathManager.AddExcludePath(string). If any paths cannot be enumerated, they are added to the PathManager.FailedFiles
list, which is cleared before enumeration begins. |
PathManager | | A synonym for PathManager.AddIncludePath(string), only chainable (returns this ). |
bool | | Returns true iff the specified path is part of the path set. |
bool | | Returns true iff the specified path and all the subpaths are part of the path set. |
void | | Resets the set of paths to a state where all paths are excluded. |
Instance properties
List<PathManager.PathInfo> | | Contains the list of all included and excluded paths. |
Func<DirectoryInfo, bool> | |
If set, this callback is invoked whenever a reparse point is encountered to decide whether to process it or
skip it. If null, reparse points are not recursed into. |
Instance fields
List<FileSystemInfo> | | Paths which could not be read while enumerating PathManager. Automatically cleared before each enumeration. |
Func<FileSystemInfo, Exception, bool> | |
If assigned, this delegate will be called whenever a directory cannot be enumerated, e.g. due to being unreadable
etc. This function must return "false" in order to terminate scanning or "true" to continue. |
Nested types
| The structure used to store path information |