46 instantiations of DirectoryPath
dotnet (42)
BuildServer\BuildServerProvider.cs (2)
73
return new
DirectoryPath
(directory);
76
return new
DirectoryPath
(
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (1)
19
private readonly ToolManifestFinder _toolManifest = toolManifest ?? new ToolManifestFinder(new
DirectoryPath
(currentWorkingDirectory ?? Directory.GetCurrentDirectory()));
Commands\Package\PackageCommandParser.cs (2)
75
var downloader = new NuGetPackageDownloader.NuGetPackageDownloader(packageInstallDir: new
DirectoryPath
());
89
var downloader = new NuGetPackageDownloader.NuGetPackageDownloader(packageInstallDir: new
DirectoryPath
());
Commands\Tool\Execute\ToolExecuteCommand.cs (1)
48
_toolManifestFinder = toolManifestFinder ?? new ToolManifestFinder(new
DirectoryPath
(currentWorkingDirectory ?? Directory.GetCurrentDirectory()));
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (2)
98
var tempDir = new
DirectoryPath
(TemporaryDirectory.CreateSubdirectory());
184
toolPath = new
DirectoryPath
(_toolPath);
Commands\Tool\Install\ToolInstallLocalCommand.cs (1)
62
_toolManifestFinder = toolManifestFinder ?? 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)
57
?? new ToolManifestFinder(new
DirectoryPath
(Directory.GetCurrentDirectory()));
Commands\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommand.cs (1)
46
toolDirectoryPath = new
DirectoryPath
(toolPath);
Commands\Tool\Uninstall\ToolUninstallLocalCommand.cs (1)
37
new ToolManifestFinder(new
DirectoryPath
(Directory.GetCurrentDirectory()));
Commands\Tool\Update\ToolUpdateCommand.cs (1)
48
DirectoryPath? location = string.IsNullOrWhiteSpace(_toolPath) ? null : new
DirectoryPath
(_toolPath);
Commands\Tool\Update\ToolUpdateLocalCommand.cs (1)
37
_toolManifestFinder = toolManifestFinder ?? new ToolManifestFinder(new
DirectoryPath
(Directory.GetCurrentDirectory()));
Commands\Workload\Install\FileBasedInstaller.cs (3)
61
_tempPackagesDir = new
DirectoryPath
(tempDirPath ?? TemporaryDirectory.CreateSubdirectory());
216
var packFiles = _nugetPackageDownloader.ExtractPackageAsync(packagePath, new
DirectoryPath
(tempExtractionDir)).GetAwaiter().GetResult();
675
await _nugetPackageDownloader.ExtractPackageAsync(nupkgPath, new
DirectoryPath
(extractionPath));
Commands\Workload\Install\WorkloadInstallCommand.cs (2)
159
DownloadToOfflineCacheAsync(workloadsToDownload, new
DirectoryPath
(_downloadToCacheOption), _skipManifestUpdate, _includePreviews).Wait();
236
DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new
DirectoryPath
(_fromCacheOption);
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
68
var tempPackagesDir = new
DirectoryPath
(TemporaryDirectory.CreateSubdirectory());
Commands\Workload\InstallingWorkloadCommand.cs (3)
369
tempPath = new
DirectoryPath
(Path.Combine(TempDirectoryPath, "dotnet-manifest-extraction"));
374
folderForManifestDownloads = new
DirectoryPath
(downloadFolder);
413
DirectoryPath downloadFolderDirectoryPath =
new
(downloadFolder);
Commands\Workload\Update\WorkloadUpdateCommand.cs (3)
84
DownloadToOfflineCacheAsync(new
DirectoryPath
(_downloadToCacheOption), _includePreviews).Wait();
109
new
DirectoryPath
(_fromCacheOption))
152
DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new
DirectoryPath
(_fromCacheOption);
Commands\Workload\WorkloadCommandBase.cs (1)
118
TempPackagesDirectory = new
DirectoryPath
(Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp"));
Commands\Workload\WorkloadIntegrityChecker.cs (1)
21
var tempPackagesDirectory = new
DirectoryPath
(TemporaryDirectory.CreateSubdirectory());
ShellShim\ShellShimRepositoryFactory.cs (1)
20
return new
DirectoryPath
(CliFolderPathCalculator.ToolsShimPath);
ToolPackage\LocalToolsResolverCache.cs (1)
28
cacheDirectory ?? new
DirectoryPath
(Path.Combine(CliFolderPathCalculator.ToolsResolverCachePath));
ToolPackage\ToolPackageDownloader.cs (3)
45
new
DirectoryPath
(),
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)
56
_localToolDownloadDir = new
DirectoryPath
(SettingsUtility.GetGlobalPackagesFolder(settings));
59
_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);
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)!);
139 references to DirectoryPath
dotnet (135)
BuildServer\BuildServerProvider.cs (2)
47
var
directory = GetPidFileDirectory();
68
public
DirectoryPath
GetPidFileDirectory()
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (4)
24
internal delegate IShellShimRepository CreateShellShimRepository(string appHostSourceDirectory,
DirectoryPath
? nonGlobalLocation = null);
27
DirectoryPath
? nonGlobalLocation = null,
98
var
tempDir = new DirectoryPath(TemporaryDirectory.CreateSubdirectory());
181
DirectoryPath
? toolPath = null;
Commands\Tool\Install\ToolInstallLocalInstaller.cs (1)
48
var
rootConfigDirectory = manifestFile.GetDirectoryPath();
Commands\Tool\List\ToolListGlobalOrToolPathCommand.cs (2)
14
internal delegate IToolPackageStoreQuery CreateToolPackageStore(
DirectoryPath
? nonGlobalLocation = null);
37
DirectoryPath
? toolPath = null;
Commands\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommand.cs (3)
16
internal delegate IShellShimRepository CreateShellShimRepository(string appHostSourceDirectory,
DirectoryPath
? nonGlobalLocation = null);
17
internal delegate (IToolPackageStore, IToolPackageStoreQuery, IToolPackageUninstaller) CreateToolPackageStoresAndUninstaller(
DirectoryPath
? nonGlobalLocation = null);
35
DirectoryPath
? toolDirectoryPath = null;
Commands\Tool\Update\ToolUpdateCommand.cs (1)
48
DirectoryPath
? location = string.IsNullOrWhiteSpace(_toolPath) ? null : new DirectoryPath(_toolPath);
Commands\Tool\Update\ToolUpdateGlobalOrToolPathCommand.cs (1)
17
DirectoryPath
? nonGlobalLocation = null,
Commands\Workload\Install\FileBasedInstaller.cs (12)
37
protected readonly
DirectoryPath
_tempPackagesDir;
101
public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion,
DirectoryPath
? offlineCache = null)
141
public void InstallWorkloads(IEnumerable<WorkloadId> workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext,
DirectoryPath
? offlineCache = null)
146
public void InstallWorkloads(IEnumerable<WorkloadId> workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext, bool overwriteExistingPacks,
DirectoryPath
? offlineCache = null)
223
FileAccessRetrier.RetryOnMoveAccessFailure(() =>
DirectoryPath
.MoveDirectory(tempExtractionDir, packInfo.Path));
266
public void RepairWorkloads(IEnumerable<WorkloadId> workloadIds, SdkFeatureBand sdkFeatureBand,
DirectoryPath
? offlineCache = null)
276
public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext,
DirectoryPath
? offlineCache = null)
304
void InstallPackage(PackageId packageId, string packageVersion, string targetFolder, ITransactionContext transactionContext,
DirectoryPath
? offlineCache)
335
FileAccessRetrier.RetryOnMoveAccessFailure(() =>
DirectoryPath
.MoveDirectory(targetFolder, tempBackupDir));
347
FileAccessRetrier.RetryOnMoveAccessFailure(() =>
DirectoryPath
.MoveDirectory(tempBackupDir, targetFolder));
395
public void GarbageCollect(Func<string, IWorkloadResolver> getResolverForWorkloadSet,
DirectoryPath
? offlineCache = null, bool cleanAllPacks = false)
681
FileAccessRetrier.RetryOnMoveAccessFailure(() =>
DirectoryPath
.MoveDirectory(Path.Combine(extractionPath, "data"), targetPath));
Commands\Workload\Install\IInstaller.cs (5)
19
void InstallWorkloads(IEnumerable<WorkloadId> workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext,
DirectoryPath
? offlineCache = null);
21
void RepairWorkloads(IEnumerable<WorkloadId> workloadIds, SdkFeatureBand sdkFeatureBand,
DirectoryPath
? offlineCache = null);
23
void GarbageCollect(Func<string, IWorkloadResolver> getResolverForWorkloadSet,
DirectoryPath
? offlineCache = null, bool cleanAllPacks = false);
25
WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion,
DirectoryPath
? offlineCache = null);
27
void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext,
DirectoryPath
? offlineCache = null);
Commands\Workload\Install\IWorkloadManifestUpdater.cs (1)
13
Task UpdateAdvertisingManifestsAsync(bool includePreviews, bool useWorkloadSets = false,
DirectoryPath
? offlineCache = null);
Commands\Workload\Install\WorkloadInstallCommand.cs (3)
236
DirectoryPath
? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption);
310
internal static void TryRunGarbageCollection(IInstaller workloadInstaller, IReporter reporter, VerbosityOptions verbosity, Func<string, IWorkloadResolver> getResolverForWorkloadSet,
DirectoryPath
? offlineCache = null)
340
private Task DownloadToOfflineCacheAsync(IEnumerable<WorkloadId> workloadIds,
DirectoryPath
offlineCache, bool skipManifestUpdate, bool includePreviews)
Commands\Workload\Install\WorkloadManifestUpdater.cs (4)
68
var
tempPackagesDir = new DirectoryPath(TemporaryDirectory.CreateSubdirectory());
92
public async Task UpdateAdvertisingManifestsAsync(bool includePreviews, bool useWorkloadSets = false,
DirectoryPath
? offlineCache = null)
323
private async Task<bool> UpdateManifestWithVersionAsync(string id, bool includePreviews, SdkFeatureBand band, NuGetVersion packageVersion = null,
DirectoryPath
? offlineCache = null)
406
private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, bool includePreviews,
DirectoryPath
? offlineCache = null)
Commands\Workload\InstallingWorkloadCommand.cs (4)
178
protected void UpdateWorkloadManifests(WorkloadHistoryRecorder recorder, ITransactionContext context,
DirectoryPath
? offlineCache)
363
DirectoryPath
? tempPath = null;
368
DirectoryPath
folderForManifestDownloads;
413
DirectoryPath
downloadFolderDirectoryPath = new(downloadFolder);
Commands\Workload\Update\WorkloadUpdateCommand.cs (3)
152
DirectoryPath
? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption);
184
private void UpdateInstalledWorkloadsFromHistory(ITransactionContext context,
DirectoryPath
? offlineCache)
205
private async Task DownloadToOfflineCacheAsync(
DirectoryPath
offlineCache, bool includePreviews)
Commands\Workload\WorkloadCommandBase.cs (1)
47
protected
DirectoryPath
TempPackagesDirectory
Commands\Workload\WorkloadIntegrityChecker.cs (1)
21
var
tempPackagesDirectory = new DirectoryPath(TemporaryDirectory.CreateSubdirectory());
NugetPackageDownloader\INuGetPackageDownloader.cs (2)
20
DirectoryPath
? downloadFolder = null,
28
Task<IEnumerable<string>> ExtractPackageAsync(string packagePath,
DirectoryPath
targetFolder);
NugetPackageDownloader\NuGetPackageDownloader.cs (5)
33
private readonly
DirectoryPath
_packageInstallDir;
67
DirectoryPath
packageInstallDir,
141
DirectoryPath
packageInstallDir,
164
DirectoryPath
? downloadFolder = null,
324
public async Task<IEnumerable<string>> ExtractPackageAsync(string packagePath,
DirectoryPath
targetFolder)
NugetPackageDownloader\PackageSourceLocation.cs (2)
15
DirectoryPath
? rootConfigDirectory = null,
34
public
DirectoryPath
? RootConfigDirectory { get; }
ShellShim\ShellShimRepository.cs (2)
13
DirectoryPath
shimsDirectory,
19
private readonly
DirectoryPath
_shimsDirectory = shimsDirectory;
ShellShim\ShellShimRepositoryFactory.cs (2)
13
public static IShellShimRepository CreateShellShimRepository(string appHostSourceDirectory,
DirectoryPath
? nonGlobalLocation = null)
18
private static
DirectoryPath
GetShimLocation()
ShellShim\ShellShimTemplateFinder.cs (2)
17
DirectoryPath
tempDir,
20
private readonly
DirectoryPath
_tempDir = tempDir;
ToolManifest\ToolManifestEditor.cs (2)
113
Read(FilePath manifest,
DirectoryPath
correspondingDirectory)
226
DirectoryPath
correspondingDirectory)
ToolManifest\ToolManifestFinder.cs (19)
14
private readonly
DirectoryPath
_probeStart;
22
DirectoryPath
probeStart,
36
IEnumerable<(FilePath manifestfile,
DirectoryPath
_)> allPossibleManifests =
53
IEnumerable<(FilePath manifestfile,
DirectoryPath
_)> allPossibleManifests =
65
IEnumerable<(FilePath manifestfile,
DirectoryPath
_)> allPossibleManifests,
70
foreach ((FilePath possibleManifest,
DirectoryPath
correspondingDirectory) in allPossibleManifests)
103
foreach ((FilePath possibleManifest,
DirectoryPath
correspondingDirectory) in
135
foreach ((FilePath possibleManifest,
DirectoryPath
correspondingDirectory) in
160
private IEnumerable<(FilePath manifestfile,
DirectoryPath
manifestFileFirstEffectDirectory)>
163
DirectoryPath
? currentSearchDirectory = _probeStart;
166
var
currentSearchDotConfigDirectory =
195
foreach ((FilePath possibleManifest,
DirectoryPath
_) in EnumerateDefaultAllPossibleManifests())
204
DirectoryPath
manifestInsertFolder = GetDirectoryToCreateToolManifest();
219
private
DirectoryPath
GetDirectoryToCreateToolManifest()
221
DirectoryPath
? currentSearchDirectory = _probeStart;
224
var
currentSearchGitDirectory = currentSearchDirectory.Value.WithSubDirectories(Constants.GitDirectoryName);
244
private string WriteManifestFile(
DirectoryPath
folderPath)
266
DirectoryPath
? rootPath = null;
268
DirectoryPath
correspondingDirectory)
ToolManifest\ToolManifestPackage.cs (2)
17
DirectoryPath
firstEffectDirectory,
29
public
DirectoryPath
FirstEffectDirectory { get; } = firstEffectDirectory;
ToolPackage\IToolPackage.cs (1)
22
DirectoryPath
PackageDirectory { get; }
ToolPackage\IToolPackageStore.cs (5)
13
DirectoryPath
Root { get; }
15
DirectoryPath
GetRandomStagingDirectory();
17
NuGetVersion GetStagedPackageVersion(
DirectoryPath
stagingDirectory, PackageId packageId);
19
DirectoryPath
GetRootPackageDirectory(PackageId packageId);
21
DirectoryPath
GetPackageDirectory(PackageId packageId, NuGetVersion version);
ToolPackage\IToolPackageUninstaller.cs (1)
12
void Uninstall(
DirectoryPath
packageDirectory);
ToolPackage\LocalToolsResolverCache.cs (3)
18
private readonly
DirectoryPath
_cacheVersionedDirectory;
23
DirectoryPath
? cacheDirectory = null,
27
DirectoryPath
appliedCacheDirectory =
ToolPackage\PackageLocation.cs (2)
13
DirectoryPath
? rootConfigDirectory = null,
19
public
DirectoryPath
? RootConfigDirectory { get; } = rootConfigDirectory;
ToolPackage\ToolPackageDownloader.cs (3)
120
protected override ToolConfiguration GetToolConfiguration(PackageId id,
DirectoryPath
packageDirectory,
DirectoryPath
assetsJsonParentDirectory)
128
DirectoryPath
packagesRootPath,
ToolPackage\ToolPackageDownloaderBase.cs (12)
30
protected readonly
DirectoryPath
_globalToolStageDir;
34
protected readonly
DirectoryPath
_localToolDownloadDir;
38
protected readonly
DirectoryPath
_localToolAssetDir;
86
DirectoryPath
packagesRootPath,
93
DirectoryPath
packageDirectory,
94
DirectoryPath
assetsJsonParentDirectory);
188
var
toolStoreTargetDirectory = _toolPackageStore.GetPackageDirectory(packageId, packageVersion);
225
DirectoryPath
packageRootDirectory = _toolPackageStore.GetRootPackageDirectory(packageId);
268
DirectoryPath
packageDownloadDir,
274
DirectoryPath
assetFileDirectory,
335
DirectoryPath
packageDownloadDir,
336
DirectoryPath
assetFileDirectory,
ToolPackage\ToolPackageFactory.cs (6)
14
DirectoryPath
? nonGlobalLocation = null, string runtimeJsonPathForTests = null)
23
DirectoryPath
? nonGlobalLocation = null)
37
DirectoryPath
? nonGlobalLocation = null, IEnumerable<string> additionalRestoreArguments = null, string currentWorkingDirectory = null)
49
DirectoryPath
? nonGlobalLocation = null)
54
private static
DirectoryPath
GetPackageLocation()
60
DirectoryPath
? nonGlobalLocation = null)
ToolPackage\ToolPackageInstance.cs (6)
30
public
DirectoryPath
PackageDirectory { get; private set; }
46
DirectoryPath
packageDirectory,
47
DirectoryPath
assetsJsonParentDirectory,
163
DirectoryPath
packageDirectory,
164
DirectoryPath
assetsJsonParentDirectory, IFileSystem fileSystem)
172
private static ToolConfiguration DeserializeToolConfiguration(LockFileTargetLibrary library,
DirectoryPath
packageDirectory, PackageId packageId, IFileSystem fileSystem)
ToolPackage\ToolPackageStoreAndQuery.cs (8)
11
internal class ToolPackageStoreAndQuery(
DirectoryPath
root, IFileSystem fileSystem = null) : IToolPackageStoreQuery, IToolPackageStore
15
public
DirectoryPath
Root { get; private set; } = new DirectoryPath(Path.GetFullPath(root.Value));
19
public
DirectoryPath
GetRandomStagingDirectory()
24
public NuGetVersion GetStagedPackageVersion(
DirectoryPath
stagingDirectory, PackageId packageId)
41
public
DirectoryPath
GetRootPackageDirectory(PackageId packageId)
46
public
DirectoryPath
GetPackageDirectory(PackageId packageId, NuGetVersion version)
84
var
packageRootDirectory = Root.WithSubDirectories(packageId.ToString());
106
var
directory = GetPackageDirectory(packageId, version);
ToolPackage\ToolPackageUninstaller.cs (2)
15
public void Uninstall(
DirectoryPath
packageDirectory)
17
var
rootDirectory = packageDirectory.GetParentPath();
Microsoft.DotNet.InternalAbstractions (4)
DirectoryPath.cs (3)
24
public
DirectoryPath
WithSubDirectories(params string[] paths)
43
public
DirectoryPath
GetParentPath()
58
public
DirectoryPath
? GetParentPathNullable()
FilePath.cs (1)
29
public
DirectoryPath
GetDirectoryPath()