private void CreateBackup(Project oldProject) { // Copy the original directory and all its content before it is renamed. string sourceDirectory = oldProject.ProjectDirectory; string targetDirectory = string.Format("{0}{1}", oldProject.ProjectDirectory, Constants.ProjectDirectoryBackupExtension); copyService.CopyDirectory(sourceDirectory, targetDirectory); // Also make a copy of the original solution file. string sourceFile = oldProject.SolutionPath; string targetFile = string.Format("{0}{1}", oldProject.SolutionPath, Constants.SolutionBackupExtension); copyService.CopyFile(sourceFile, targetFile); }
public async Task Copy([FromBody] Item item) { await _copyService.CopyDirectory(item); }