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

@@ -17,6 +17,17 @@ public class IdeFileExternalChangeHandler
GlobalEvents.Instance.FileSystemWatcherInternal.FileChanged.Subscribe(OnFileChanged);
GlobalEvents.Instance.FileSystemWatcherInternal.FileCreated.Subscribe(OnFileCreated);
GlobalEvents.Instance.FileSystemWatcherInternal.DirectoryCreated.Subscribe(OnFolderCreated);
GlobalEvents.Instance.FileSystemWatcherInternal.DirectoryDeleted.Subscribe(OnFolderDeleted);
}
private async Task OnFolderDeleted(string folderPath)
{
var sharpIdeFolder = SolutionModel.AllFolders.SingleOrDefault(f => f.Path == folderPath);
if (sharpIdeFolder is null)
{
return;
}
await _sharpIdeSolutionModificationService.RemoveDirectory(sharpIdeFolder);
}
private async Task OnFolderCreated(string folderPath)