This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

IFileWatchAware Pennington.Infrastructure

The single contract for anything that reacts to file-system changes. Implementers declare the directories they need watched and how they respond to a change; FileWatchDispatcher owns every IFileWatcher call.

Properties

WatchScopes IReadOnlyList<FileWatchScope>
Directories needing an OS-level watcher. Empty (the default) for aggregators that ride notifications other watchers already produce.

Methods

OnFileChanged

#
public FileWatchResponse OnFileChanged(FileChangeNotification change)

Called on the file-watcher thread for every watched change. Must be quick and thread-safe.

Parameters

change FileChangeNotification

Returns

FileWatchResponse

Pennington.Infrastructure.IFileWatchAware

namespace Pennington.Infrastructure;

/// The single contract for anything that reacts to file-system changes. Implementers declare the directories they need watched and how they respond to a change; FileWatchDispatcher owns every IFileWatcher call.
public interface IFileWatchAware
{
    /// Called on the file-watcher thread for every watched change. Must be quick and thread-safe.
    
public FileWatchResponse OnFileChanged(FileChangeNotification change)
; /// Directories needing an OS-level watcher. Empty (the default) for aggregators that ride notifications other watchers already produce.
public IReadOnlyList<FileWatchScope> WatchScopes { get; }
}