Пример #1
0
        protected virtual void CopyAssembliesToLocalFolder(string concreteBuildRemoteDXDependenciesDirectoryPath, string concreteBuildLocalDXDependenciesDirectoryPath)
        {
            SearchOption searchOptions;

            if (ExampleInfoController.IsWindows10AppsPlatformExample)
            {
                searchOptions = SearchOption.AllDirectories;
            }
            else
            {
                searchOptions = SearchOption.TopDirectoryOnly;
            }
            FileSystemService.CopyDirectory(concreteBuildRemoteDXDependenciesDirectoryPath, concreteBuildLocalDXDependenciesDirectoryPath, searchOptions, new string[] { @"\w+.dll", @"\w+.exe" });
        }
Пример #2
0
        public void Copy(string sourcePath, string destinationPath)
        {
            string text = Path.Combine(RootDirectoryPath, PreparePath(sourcePath));
            string path = Path.Combine(RootDirectoryPath, PreparePath(destinationPath));

            if (FileSystemService.DirectoryExists(text))
            {
                string destinationPath2 = GenerateCopiedFileItemPath(path, Path.GetFileName(text), isDirectory: true);
                FileSystemService.CopyDirectory(text, destinationPath2);
            }
            else if (FileSystemService.FileExists(text))
            {
                string destinationFilePath = GenerateCopiedFileItemPath(path, Path.GetFileName(text), isDirectory: false);
                FileSystemService.CopyFile(text, destinationFilePath);
            }
            else
            {
                FileManagementExceptionExecutor.ThrowFileNotFound(destinationPath);
            }
        }