Directory Notifier
Demo Application
PerigeeApplication.ApplicationNoInit("HotReloadExample", (c) => {
c.AddDirectoryNotifier("ReloadConfigs", @"C:\Watch", @".*\.json$", SearchOption.TopDirectoryOnly,
(ct, l, path) => {
//path is the full file path of the file that was modified or added, or removed.
//Before loading or reading, verify it's existance:
if (File.Exists(path))
{
//Added / Modified and no longer being written to
}
else
{
//Removed
}
},
true, null, null, NotifyInitial: true, started: true);
});Last updated
