rename directory from IDE

This commit is contained in:
Matt Parker
2025-10-21 18:16:09 +10:00
parent 575cdf61c0
commit 4496f44a21
11 changed files with 211 additions and 8 deletions

View File

@@ -796,4 +796,11 @@ public class RoslynAnalysis
_workspace.TryApplyChanges(newSolution);
}
public async Task MoveDocument(SharpIdeFile sharpIdeFile, string oldFilePath)
{
var document = _workspace!.CurrentSolution.GetDocumentIdsWithFilePath(oldFilePath).Single();
var updatedSolution = _workspace.CurrentSolution.WithDocumentFilePath(document, sharpIdeFile.Path);
_workspace.TryApplyChanges(updatedSolution);
}
}