public void CreateStaticFiles(IEnumerable <IncludedFile> filePaths, string folder) { CreateStaticFilesDetails(filePaths, folder); foreach (string filePath in filePaths.Select(f => f.FullFilePath)) { string filename = Path.GetFileName(filePath); var fileContents = fileController.ReadAllBytes(filePath); string targetPath = folder.PathSlash(filename); // Don't copy a file to itself. if (targetPath == filePath) { continue; } fileController.WriteAllBytes(targetPath, fileContents); } }