188 references to DirectoryPath
dotnet (42)
BuildServer\BuildServerProvider.cs (2)
73return new DirectoryPath(directory); 76return new DirectoryPath(
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (1)
22private readonly ToolManifestFinder _toolManifest = toolManifest ?? new ToolManifestFinder(new DirectoryPath(currentWorkingDirectory ?? Directory.GetCurrentDirectory()));
Commands\Tool\Execute\ToolExecuteCommand.cs (1)
40private readonly ToolManifestFinder _toolManifestFinder = toolManifestFinder ?? new ToolManifestFinder(new DirectoryPath(currentWorkingDirectory ?? Directory.GetCurrentDirectory()));
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (2)
87var tempDir = new DirectoryPath(PathUtilities.CreateTempSubdirectory()); 155toolPath = new DirectoryPath(_toolPath);
Commands\Tool\Install\ToolInstallLocalCommand.cs (1)
58new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory()));
Commands\Tool\List\ToolListGlobalOrToolPathCommand.cs (1)
48toolPath = new DirectoryPath(toolPathOption);
Commands\Tool\List\ToolListLocalCommand.cs (1)
29new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory()));
Commands\Tool\Restore\ToolRestoreCommand.cs (1)
56?? new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory()));
Commands\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommand.cs (1)
48toolDirectoryPath = new DirectoryPath(toolPath);
Commands\Tool\Uninstall\ToolUninstallLocalCommand.cs (1)
38new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory()));
Commands\Tool\Update\ToolUpdateCommand.cs (1)
51DirectoryPath? location = string.IsNullOrWhiteSpace(_toolPath) ? null : new DirectoryPath(_toolPath);
Commands\Tool\Update\ToolUpdateLocalCommand.cs (1)
50new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory()));
Commands\Workload\Install\FileBasedInstaller.cs (3)
59_tempPackagesDir = new DirectoryPath(tempDirPath ?? PathUtilities.CreateTempSubdirectory()); 213var packFiles = _nugetPackageDownloader.ExtractPackageAsync(packagePath, new DirectoryPath(tempExtractionDir)).GetAwaiter().GetResult(); 672await _nugetPackageDownloader.ExtractPackageAsync(nupkgPath, new DirectoryPath(extractionPath));
Commands\Workload\Install\NetSdkMsiInstallerClient.cs (3)
755await _nugetPackageDownloader.ExtractPackageAsync(nupkgPath, new DirectoryPath(extractionPath)); 958_ = _nugetPackageDownloader.ExtractPackageAsync(packagePath, new DirectoryPath(extractionDirectory)).Result; 1128DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? PathUtilities.CreateTempSubdirectory() : tempDirPath);
Commands\Workload\Install\WorkloadInstallCommand.cs (2)
146DownloadToOfflineCacheAsync(workloadsToDownload, new DirectoryPath(_downloadToCacheOption), _skipManifestUpdate, _includePreviews).Wait(); 221DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption);
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
67var tempPackagesDir = new DirectoryPath(PathUtilities.CreateTempSubdirectory());
Commands\Workload\InstallingWorkloadCommand.cs (3)
372tempPath = new DirectoryPath(Path.Combine(TempDirectoryPath, "dotnet-manifest-extraction")); 377folderForManifestDownloads = new DirectoryPath(downloadFolder); 416DirectoryPath downloadFolderDirectoryPath = new(downloadFolder);
Commands\Workload\Update\WorkloadUpdateCommand.cs (3)
77DownloadToOfflineCacheAsync(new DirectoryPath(_downloadToCacheOption), _includePreviews).Wait(); 106new DirectoryPath(_fromCacheOption)) 149DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption);
Commands\Workload\WorkloadCommandBase.cs (1)
111TempPackagesDirectory = new DirectoryPath(Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp"));
Commands\Workload\WorkloadIntegrityChecker.cs (1)
21var tempPackagesDirectory = new DirectoryPath(PathUtilities.CreateTempSubdirectory());
ShellShim\ShellShimRepositoryFactory.cs (1)
20return new DirectoryPath(CliFolderPathCalculator.ToolsShimPath);
ToolPackage\LocalToolsResolverCache.cs (1)
27cacheDirectory ?? new DirectoryPath(Path.Combine(CliFolderPathCalculator.ToolsResolverCachePath));
ToolPackage\ToolPackageDownloader.cs (2)
72includeUnlisted: includeUnlisted, downloadFolder: new DirectoryPath(packagesRootPath)).ConfigureAwait(false).GetAwaiter().GetResult(); 98nugetPackageDownloader.ExtractPackageAsync(packagePath, new DirectoryPath(nupkgDir)).ConfigureAwait(false).GetAwaiter().GetResult();
ToolPackage\ToolPackageDownloaderBase.cs (2)
53_localToolDownloadDir = new DirectoryPath(SettingsUtility.GetGlobalPackagesFolder(settings)); 56_localToolAssetDir = new DirectoryPath(_fileSystem.Directory.CreateTemporarySubdirectory());
ToolPackage\ToolPackageFactory.cs (2)
56return new DirectoryPath(CliFolderPathCalculator.ToolsPackagePath); 64? new DirectoryPath(
ToolPackage\ToolPackageStoreAndQuery.cs (3)
15public DirectoryPath Root { get; private set; } = new DirectoryPath(Path.GetFullPath(root.Value)); 94packageDirectory: new DirectoryPath(subdirectory), 95assetsJsonParentDirectory: new DirectoryPath(subdirectory), _fileSystem);
dotnet.Tests (121)
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (6)
27_nugetGlobalPackagesFolder = new DirectoryPath(NuGetGlobalPackagesFolder.GetLocation()); 32new DirectoryPath(Path.Combine(temporaryDirectory, "cache"))); 90new(new DirectoryPath(_testDirectoryRoot), _fileSystem, new FakeDangerousFileDetector()); 123new(new DirectoryPath(_testDirectoryRoot), _fileSystem, new FakeDangerousFileDetector()); 164new(new DirectoryPath(_testDirectoryRoot), _fileSystem); 186new(new DirectoryPath(_testDirectoryRoot), _fileSystem);
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (7)
60var toolPackageStoreMock = new ToolPackageStoreAndQuery(new DirectoryPath(_pathToPlacePackages), _fileSystem); 65new DirectoryPath(_pathToPlaceShim), 73new DirectoryPath(_toolsDirectory), 122rootConfigDirectory: new DirectoryPath(testAsset.Path), 124var nuGetPackageDownloader = new NuGetPackageDownloader(new DirectoryPath(testAsset.Path)); 643nugetPackageDownloader: new NuGetPackageDownloader(new DirectoryPath(PathUtilities.CreateTempSubdirectory()), verifySignatures: false, currentWorkingDirectory: testDir), 654new DirectoryPath(_pathToPlaceShim),
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (4)
51new(new DirectoryPath(_pathToPlacePackages), _fileSystem); 78new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")), 83_toolManifestFinder = new ToolManifestFinder(new DirectoryPath(_temporaryDirectory), _fileSystem, new FakeDangerousFileDetector()); 91new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")),
CommandTests\Tool\List\ToolListLocalCommandTests.cs (2)
40new DirectoryPath(_temporaryDirectory), 46new DirectoryPath(_temporaryDirectory),
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (15)
59_nugetGlobalPackagesFolder = new DirectoryPath(NuGetGlobalPackagesFolder.GetLocation()); 63new(new DirectoryPath(_pathToPlacePackages), _fileSystem); 107new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")), 119new DirectoryPath(_temporaryDirectory), 123new DirectoryPath(_temporaryDirectory), 158new DirectoryPath(_temporaryDirectory), 162new DirectoryPath(_temporaryDirectory), 195new DirectoryPath(_temporaryDirectory), 199new DirectoryPath(_temporaryDirectory), 252new DirectoryPath(_temporaryDirectory), 256new DirectoryPath(_temporaryDirectory), 297new DirectoryPath(_temporaryDirectory), 441new ToolManifestFinder(new DirectoryPath(Path.GetTempPath()), _fileSystem, new FakeDangerousFileDetector()); 466new DirectoryPath(_temporaryDirectory), 494new DirectoryPath(_temporaryDirectory),
CommandTests\Tool\Restore\ToolRestoreCommandWithMultipleNugetConfigTests.cs (4)
50new(new DirectoryPath(pathToPlacePackages), _fileSystem); 59new DirectoryPath(Path.Combine(temporaryDirectory, "cache")), 120new DirectoryPath(Path.GetDirectoryName(_nugetConfigUnderTestRoot)), 124new DirectoryPath(Path.GetDirectoryName(_nugetConfigUnderSubDir)),
CommandTests\Tool\Run\ToolRunCommandTests.cs (3)
23_nugetGlobalPackagesFolder = new DirectoryPath(NuGetGlobalPackagesFolder.GetLocation()); 76new ToolManifestFinder(new DirectoryPath(testDirectoryRoot.Path), fileSystem, new FakeDangerousFileDetector()); 86new DirectoryPath(Path.Combine(temporaryDirectory, "cache")));
CommandTests\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommandTests.cs (9)
72var packageDirectory = new DirectoryPath(Path.GetFullPath(_toolsDirectory)) 114var packageDirectory = new DirectoryPath(Path.GetFullPath(_toolsDirectory)) 133new DirectoryPath(_toolsDirectory), 143new DirectoryPath(_shimsDirectory), 184var packageDirectory = new DirectoryPath(Path.GetFullPath(_toolsDirectory)) 232var store = new ToolPackageStoreMock(new DirectoryPath(_toolsDirectory), _fileSystem); 248new DirectoryPath(_shimsDirectory), 264new DirectoryPath(_toolsDirectory), 274new DirectoryPath(_shimsDirectory),
CommandTests\Tool\Uninstall\ToolUninstallLocalCommandTests.cs (1)
41_toolManifestFinder = new ToolManifestFinder(new DirectoryPath(_temporaryDirectory), _fileSystem, new FakeDangerousFileDetector());
CommandTests\Tool\Update\ToolUpdateGlobalOrToolPathCommandTests.cs (2)
47_store = new ToolPackageStoreMock(new DirectoryPath(_toolsDirectory), _fileSystem); 477new DirectoryPath(_shimsDirectory),
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (3)
64new(new DirectoryPath(_pathToPlacePackages), _fileSystem); 98new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")), 103_toolManifestFinder = new ToolManifestFinder(new DirectoryPath(_temporaryDirectory), _fileSystem,
CommandTests\Workload\Install\GivenDotnetWorkloadInstall.cs (1)
261installer.InstalledManifests[0].offlineCache.Should().Be(new DirectoryPath(cachePath));
CommandTests\Workload\Install\GivenFileBasedWorkloadInstall.cs (2)
390CliTransaction.RunNew(context => installer.InstallWorkloads(new[] { new WorkloadId("android-sdk-workload") }, new SdkFeatureBand(version), context, new DirectoryPath(cachePath))); 415CliTransaction.RunNew(context => installer.InstallWorkloads(new[] { new WorkloadId("android-sdk-workload") }, new SdkFeatureBand(version), context, new DirectoryPath(cachePath))));
CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs (4)
253await manifestUpdater.UpdateAdvertisingManifestsAsync(includePreviews: true, offlineCache: new DirectoryPath(offlineCacheDir)); 329await manifestUpdater.UpdateAdvertisingManifestsAsync(includePreviews: true, offlineCache: new DirectoryPath(offlineCacheDir)); 395await manifestUpdater.UpdateAdvertisingManifestsAsync(includePreviews: true, offlineCache: new DirectoryPath(offlineCacheDir)); 568await manifestUpdater.UpdateAdvertisingManifestsAsync(false, false, new DirectoryPath(offlineCache));
ShellShimTests\ShellShimRepositoryTests.cs (4)
70return new ShellShimRepository(new DirectoryPath(pathToShim), stage2AppHostTemplateDirectory); 102var shellShimRepository = new ShellShimRepository(new DirectoryPath(Path.Combine(testFolder, extraNonExistDirectory)), GetAppHostTemplateFromStage2()); 426var templateFinder = new ShellShimTemplateFinder(new MockNuGetPackageDownloader(), new DirectoryPath(tempDir), null); 523new DirectoryPath(pathToShim),
ToolManifestTests\ToolManifestEditorTests.cs (1)
178toolManifestFileEditor.Read(new FilePath(manifestFile), new DirectoryPath(_testDirectoryRoot));
ToolManifestTests\ToolManifestFinderTests.cs (53)
34new DirectoryPath(_testDirectoryRoot), 40new DirectoryPath(_testDirectoryRoot), 51new DirectoryPath(_testDirectoryRoot), 67new DirectoryPath(subdirectoryOfTestRoot), 84new DirectoryPath(_testDirectoryRoot), 96var rootDirectory = new DirectoryPath(_testDirectoryRoot); 106new DirectoryPath(_testDirectoryRoot), 118new DirectoryPath(rootDirectory.Value), 124new DirectoryPath(rootDirectory.Value), 134var rootDirectory = new DirectoryPath(_testDirectoryRoot); 144new DirectoryPath(_testDirectoryRoot), 157var rootDirectory = new DirectoryPath(_testDirectoryRoot); 167new DirectoryPath(_testDirectoryRoot), 187new DirectoryPath(rootDirectory.Value), 193new DirectoryPath(rootDirectory.Value), 207new DirectoryPath(_testDirectoryRoot), 225new DirectoryPath(_testDirectoryRoot), 251new DirectoryPath(_testDirectoryRoot), 267new DirectoryPath(_testDirectoryRoot), 282new DirectoryPath(_testDirectoryRoot), 302new DirectoryPath(_testDirectoryRoot), 319new DirectoryPath(_testDirectoryRoot), 336new DirectoryPath(_testDirectoryRoot), 356new DirectoryPath(subdirectoryOfTestRoot), 367new DirectoryPath(subdirectoryOfTestRoot), 376new DirectoryPath(_testDirectoryRoot), 384new DirectoryPath(subdirectoryOfTestRoot), 402new DirectoryPath(subdirectoryOfTestRoot), 433new DirectoryPath(subdirectoryOfTestRoot), 454new DirectoryPath(subdirectoryOfTestRoot), 469new DirectoryPath(_testDirectoryRoot), 486new DirectoryPath(_testDirectoryRoot), 501new DirectoryPath(_testDirectoryRoot), 511new DirectoryPath(_testDirectoryRoot), 521new DirectoryPath(_testDirectoryRoot), 531new DirectoryPath(_testDirectoryRoot), 542new DirectoryPath(subdirectoryOfTestRoot), 552new DirectoryPath(_testDirectoryRoot), 561new DirectoryPath(_testDirectoryRoot), 574new DirectoryPath(_testDirectoryRoot), 588new DirectoryPath(_testDirectoryRoot), 602new DirectoryPath(_testDirectoryRoot), 621new DirectoryPath(subdirectoryOfTestRoot), 631new DirectoryPath(subdirectoryOfTestRoot), 646new DirectoryPath(subdirectoryOfTestRoot), 663= new ToolManifestFinder(new DirectoryPath(_testDirectoryRoot), _fileSystem, fakeMarkOfTheWebDetector); 680new DirectoryPath(_testDirectoryRoot), 696new DirectoryPath(_testDirectoryRoot), 712new DirectoryPath(_testDirectoryRoot), 726new DirectoryPath(_testDirectoryRoot), 745var toolManifest = new ToolManifestFinder(new DirectoryPath(subdirectoryOfTestRoot), _fileSystem); 762var toolManifest = new ToolManifestFinder(new DirectoryPath(testRoot), _fileSystem); 772new DirectoryPath(_testDirectoryRoot),
Microsoft.DotNet.InternalAbstractions (4)
DirectoryPath.cs (3)
30return new DirectoryPath(Path.Combine(insertValueInFront)); 55return new DirectoryPath(parentDirectory.FullName); 68return new DirectoryPath(parentDirectory.FullName);
FilePath.cs (1)
31return new DirectoryPath(Path.GetDirectoryName(Value)!);
Microsoft.DotNet.PackageInstall.Tests (16)
LocalToolsResolverCacheTests.cs (3)
25new(fileSystem.Directory.CreateTemporaryDirectory().DirectoryPath); 228new(fileSystem.Directory.CreateTemporaryDirectory().DirectoryPath); 285new(fileSystem.Directory.CreateTemporaryDirectory().DirectoryPath);
NuGetPackageInstallerExtractTests.cs (4)
26new(new DirectoryPath(Directory.GetCurrentDirectory()), null, 32IEnumerable<string> result = await installer.ExtractPackageAsync(packagePath, new DirectoryPath(targetPath)); 46new DirectoryPath(Directory.GetCurrentDirectory()), 69new(new DirectoryPath(Directory.GetCurrentDirectory()), null,
NuGetPackageInstallerTests.cs (3)
66new DirectoryPath(Path.GetTempPath()).WithSubDirectories(Path.GetRandomFileName()); 113new DirectoryPath(Path.GetTempPath()).WithSubDirectories(Path.GetRandomFileName()); 350new DirectoryPath(Path.GetTempPath()).WithSubDirectories(Path.GetRandomFileName());
ToolPackageDownloaderTests.cs (3)
454var localToolDownloadDir = Path.Combine(new DirectoryPath(SettingsUtility.GetGlobalPackagesFolder(settings)).ToString().Trim('"'), TestPackageId.ToString()); 727var store = new ToolPackageStoreAndQuery(new DirectoryPath(root.Path)); 877var root = new DirectoryPath(_testAssetsManager.CreateTestDirectory(callingMethod, identifier: useMock.ToString() + identiifer).Path);
ToolPackageInstallerNugetCacheTests.cs (2)
40new DirectoryPath(testDirectory).WithSubDirectories(Path.GetRandomFileName()); 122var root = new DirectoryPath(Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()));
ToolPackageUninstallerTests.cs (1)
75var root = new DirectoryPath(_testAssetsManager.CreateTestDirectory(testName, identifier).Path);
Microsoft.DotNet.Tools.Tests.ComponentMocks (5)
ToolPackageDownloaderMock.cs (3)
63_localToolDownloadDir = new DirectoryPath(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "nuget", "package")); 64_localToolAssetDir = new DirectoryPath(PathUtilities.CreateTempSubdirectory()); 171packageDirectory = new DirectoryPath(NuGetGlobalPackagesFolder.GetLocation()).WithSubDirectories(packageId.ToString());
ToolPackageStoreMock.cs (2)
24Root = new DirectoryPath(Path.GetFullPath(root.Value)); 105new DirectoryPath(subdirectory),