diff --git a/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs b/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs index 5aeb86304a..e5e6a512ad 100644 --- a/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs +++ b/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs @@ -323,12 +323,7 @@ public async Task OrchestrateTestHostExecutionAsync(CancellationToken cance fileSystem.CreateDirectory(Path.GetDirectoryName(finalFileLocation)!); await outputDevice.DisplayAsync(this, new TextOutputDeviceData(string.Format(CultureInfo.InvariantCulture, ExtensionResources.MovingFileToLocation, file, finalFileLocation)), cancellationToken).ConfigureAwait(false); -#if NETCOREAPP fileSystem.MoveFile(file, finalFileLocation, overwrite: true); -#else - fileSystem.CopyFile(file, finalFileLocation, overwrite: true); - fileSystem.DeleteFile(file); -#endif } } diff --git a/src/Platform/Microsoft.Testing.Platform/Helpers/System/IFileSystem.cs b/src/Platform/Microsoft.Testing.Platform/Helpers/System/IFileSystem.cs index ca8e8fd431..903f5f553e 100644 --- a/src/Platform/Microsoft.Testing.Platform/Helpers/System/IFileSystem.cs +++ b/src/Platform/Microsoft.Testing.Platform/Helpers/System/IFileSystem.cs @@ -21,9 +21,5 @@ internal interface IFileSystem Task ReadAllTextAsync(string path); - void CopyFile(string sourceFileName, string destFileName, bool overwrite = false); - - void DeleteFile(string path); - string[] GetFiles(string path, string searchPattern, SearchOption searchOption); } diff --git a/src/Platform/Microsoft.Testing.Platform/Helpers/System/SystemFileSystem.cs b/src/Platform/Microsoft.Testing.Platform/Helpers/System/SystemFileSystem.cs index d88cbf742a..ad3d5efe6a 100644 --- a/src/Platform/Microsoft.Testing.Platform/Helpers/System/SystemFileSystem.cs +++ b/src/Platform/Microsoft.Testing.Platform/Helpers/System/SystemFileSystem.cs @@ -19,10 +19,6 @@ internal sealed class SystemFileSystem : IFileSystem public Task ReadAllTextAsync(string path) => File.ReadAllTextAsync(path); - public void CopyFile(string sourceFileName, string destFileName, bool overwrite = false) => File.Copy(sourceFileName, destFileName, overwrite); - - public void DeleteFile(string path) => File.Delete(path); - public bool ExistDirectory(string? path) => Directory.Exists(path); public string[] GetFiles(string path, string searchPattern, SearchOption searchOption) => Directory.GetFiles(path, searchPattern, searchOption);