namespace BuildTool; public enum WatchMode { /// /// Check if the files/directories have changed by comparing their metadata (e.g. last modified time). /// Metadata, /// /// For files only, check if the content of the file has changed by comparing a hash of the file contents. /// Content } internal record WatchedSource(string Path, WatchMode Mode) { /// /// Path to a file or directory to be checked for changes. /// public string Path { get; init; } = Path; /// /// Gets or sets whether to check for changes in the file's metadata (e.g. last modified time) or content (e.g. hash of the file contents). /// public WatchMode Mode { get; init; } = Mode; /// /// Only if Path points to a directory, a list of subdirectories to exclude from change checking. /// public List ExcludedDirectories { get; init; } = new(); /// /// Only if Path points to a directory, whether to check for changes in subdirectories as well. /// public bool Recursive { get; init; } = true; }