implement disk event move directory

This commit is contained in:
Matt Parker
2025-10-22 00:31:01 +10:00
parent dc00618d69
commit a403cb3389

View File

@@ -32,10 +32,13 @@ public class IdeFileExternalChangeHandler
var isMoveRatherThanRename = Path.GetDirectoryName(oldFolderPath) != Path.GetDirectoryName(newFolderPath);
if (isMoveRatherThanRename)
{
throw new NotImplementedException("Moving folders is not yet supported. Note that this should only be encountered on Linux.");
await _sharpIdeSolutionModificationService.MoveDirectory(sharpIdeFolder, sharpIdeFolder);
}
else
{
var newFolderName = Path.GetFileName(newFolderPath);
await _sharpIdeSolutionModificationService.RenameDirectory(sharpIdeFolder, newFolderName);
}
var newFolderName = Path.GetFileName(newFolderPath);
await _sharpIdeSolutionModificationService.RenameDirectory(sharpIdeFolder, newFolderName);
}
private async Task OnFolderDeleted(string folderPath)