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