delete directory from disk

This commit is contained in:
Matt Parker
2025-10-20 19:00:11 +10:00
parent 76bc0afc52
commit 5eef6424f8
3 changed files with 22 additions and 1 deletions

View File

@@ -68,7 +68,16 @@ public sealed class IdeFileWatcher : IDisposable
private void HandleDeleted(string fullPath)
{
Console.WriteLine($"FileSystemWatcher: Deleted - {fullPath}");
var isDirectory = Path.HasExtension(fullPath) is false;
if (isDirectory)
{
GlobalEvents.Instance.FileSystemWatcherInternal.DirectoryDeleted.InvokeParallelFireAndForget(fullPath);
}
else
{
GlobalEvents.Instance.FileSystemWatcherInternal.FileDeleted.InvokeParallelFireAndForget(fullPath);
}
//Console.WriteLine($"FileSystemWatcher: Deleted - {fullPath}");
}
private void HandleCreated(string fullPath)