FileWatchScope
Pennington.Infrastructure
A directory and file pattern an IFileWatchAware needs OS-level watching for.
Properties
IncludeSubdirectoriesbool- Whether changes in nested directories also count.
Pathstring- Absolute directory to watch.
Patternstring- File pattern within
Path(for example*.yml).
Constructors
FileWatchScope
#public FileWatchScope(string Path, string Pattern, bool IncludeSubdirectories = false)
A directory and file pattern an IFileWatchAware needs OS-level watching for.
Parameters
Pathstring- Absolute directory to watch.
Patternstring- File pattern within
Path(for example*.yml). IncludeSubdirectoriesbool- Whether changes in nested directories also count.
Methods
Matches
#public bool Matches(FileChangeNotification change)
Returns whether change falls within this scope.
Parameters
changeFileChangeNotification
Returns
boolPennington.Infrastructure.FileWatchScope
namespace Pennington.Infrastructure;
/// A directory and file pattern an IFileWatchAware needs OS-level watching for.
public struct FileWatchScope
{
/// A directory and file pattern an IFileWatchAware needs OS-level watching for.
public FileWatchScope(string Path, string Pattern, bool IncludeSubdirectories = false)
;
/// Whether changes in nested directories also count.
public bool IncludeSubdirectories { get; set; }
/// Returns whether change falls within this scope.
public bool Matches(FileChangeNotification change)
;
/// Absolute directory to watch.
public string Path { get; set; }
/// File pattern within Path (for example *.yml).
public string Pattern { get; set; }
}