public async Task PasteFilesAsync(string destinationDirectory) { var files = await GetFilesAsync(); if (files.Any()) { await _operationsService.CopyAsync(files, destinationDirectory); } }
public async Task CopyFilesAsync(IReadOnlyList <string> files, string fullPath) { var targetDirectory = ExtractDirectory(fullPath); var filteredFiles = Filter(files, targetDirectory); if (filteredFiles.Any()) { await _operationsService.CopyAsync(filteredFiles, targetDirectory); } }
public async Task PasteFilesAsync(string destinationDirectory) { var selectedFilesString = await _clipboardService.GetTextAsync(); var startIndex = UrlPrefix.Length; var files = selectedFilesString .Split() .Where(t => t.StartsWith(UrlPrefix)) .Select(f => f.Substring(startIndex)) .ToArray(); await _operationsService.CopyAsync(files, destinationDirectory); }
private void Copy() => Execute(() => _operationsService.CopyAsync(GetSelectedNodes(), _filesOperationsMediator.OutputDirectory));
public Task CopyAsync(string filePath) => _operationsService.CopyAsync(CreateFilesList(filePath), _filesOperationsMediator.OutputDirectory);
private Task CopyAsync() => _operationsService.CopyAsync(Files, _filesOperationsMediator.OutputDirectory);
private Task CopyAsync() => _operationsService.CopyAsync(GetSelectedFiles(), _filesOperationsMediator.OutputDirectory);
public Task CopyFilesAsync(IReadOnlyList <string> files, string fullPath) => _operationsService.CopyAsync(files, ExtractDirectory(fullPath));