public async Task Upload(string from, string to = null) { to = to ?? from; Console.WriteLine($"upload '{from}' -> '{to}'"); if (File.Exists(from)) { await Hosting.UploadFileAsync(new FileInfo(from), to, new ConsoleProgressProvider()); } else { await Hosting.UploadDirectoryAsync(new DirectoryInfo(from), to, failures, successes, (p, e) => ConsoleApplication.Log(p, e)); } }