Dazinator.Extensions.FileProviders icon indicating copy to clipboard operation
Dazinator.Extensions.FileProviders copied to clipboard

Watch() extension method that allows include and exclude list.

Open dazinator opened this issue 8 years ago • 1 comments

Implement an extension method for IFileProvider that allows you to watch() for files, but using an include list and exclude list (of glob patterns, using DotNet.Glob

Have raised an issue to see if microsoft would consider putting this in the IFileProvider contract, as it allows more granular control of which files you are monitoring, which could be better for performance reasons: https://github.com/aspnet/FileSystem/issues/253

dazinator avatar Dec 18 '16 22:12 dazinator

The way I see this working, is to call Watch() on the underlying provider for each include pattern. Then evaluate the exclude patterns after the change tokens from the underlying provider are signalled. To do this, I need to be able to tell which file triggered the change token. May not be possible.

dazinator avatar Dec 18 '16 22:12 dazinator