You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
630 B
C#

namespace CommanderApp.Services;
public interface IFileOperations
{
Task<bool> CopyAsync(string sourcePath, string targetPath, bool overwrite = true);
Task<bool> MoveAsync(string sourcePath, string targetPath, bool overwrite = true);
Task<bool> DeleteAsync(string path);
Task<bool> CreateDirectoryAsync(string path);
Task<bool> OpenFileAsync(string filePath);
Task<bool> CopyDirectoryAsync(string sourceDir, string targetDir);
}
public class FileOperationResult
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
public Exception Exception { get; set; }
}