예제 #1
0
        public void CopyProject(string sourceName, string nameAs)
        {
            //!è ridondante (poiché la cartella $projects viene pulita) ma è utile durante sviluppo!
            fileManager.DeleteFolder(Path.Combine(config.DestPath, nameAs));

            var projectPath = Path.Combine(config.SourcePath, sourceName);

            if (config.ProjectTarget.TargetType == TargetType.Folder)
            {
                fileManager.CopyFolderTo(projectPath, config.DestPath, nameAs, true);
            }
            else
            {
                var destPath = Path.Combine(config.DestPath, nameAs) + config.ProjectTarget.Ext;
                fileManager.CopyFile(projectPath, destPath, true);
            }
        }