async System.Threading.Tasks.Task CopyArchiveAsync(ISshCommands sshCommands) { var serverHomeDirectory = await sshCommands.GetHomeDirectoryAsync().ConfigureAwait(continueOnCapturedContext: false); var buildPath = PlatformPath.GetServerBuildPath(serverHomeDirectory, AppName, SessionId, TargetPath); if (!Directory.Exists(buildPath)) { await sshCommands.CreateDirectoryAsync(buildPath).ConfigureAwait(continueOnCapturedContext: false); } await sshCommands.CopyDirectoryAsync(ArchivePath, buildPath).ConfigureAwait(continueOnCapturedContext: false); }