public async Task Sync(DirectoryInfo source, string destination) { var filename = destination + "/" + HashStoreFilename; Log.Verbose("Creating hashes for current deployment..."); var localFilesLookup = await FolderLookup.FromDirectory(source); Log.Verbose("Retrieving previous deployment hashes..."); var remoteFilesLookup = await FolderLookup.FromFile(client, filename); var filesToCopy = GetFilesToCopy(localFilesLookup, remoteFilesLookup); var files = filesToCopy.Select(path => new FileInfo(Path.Join(source.FullName, path))); client.MirrorDirTree(source, destination); CopyFiles(source, files.ToList(), destination); SaveLocalLookup(localFilesLookup, filename); }