public ExportGenerator(DTE dte, IFileSystem fileSystem, IFileTokenReplacer fileTokenReplacer, IMessageBox messageBox) { _dte = dte; _fileSystem = fileSystem; _fileTokenReplacer = fileTokenReplacer; _messageBox = messageBox; }
public ExportGenerator(DTE dte, IFileSystem fileSystem, IFileTokenReplacer fileTokenReplacer, IMessageBox messageBox) { _dte = dte; _fileSystem = fileSystem; _fileTokenReplacer = fileTokenReplacer; _messageBox = messageBox; }
public static void CopyFolder(string sourceFolder, string destFolder) { IFileTokenReplacer replacer = CreateTokenReplacer(); if (!Directory.Exists(destFolder)) { Directory.CreateDirectory(destFolder); } string[] files = Directory.GetFiles(sourceFolder); foreach (string file in files) { string name = Path.GetFileName(file); string dest = Path.Combine(destFolder, name); File.Copy(file, dest); replacer.Replace(dest); } string[] folders = Directory.GetDirectories(sourceFolder); foreach (string folder in folders) { string name = Path.GetFileName(folder); string dest = Path.Combine(destFolder, name); CopyFolder(folder, dest); } }