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