1087 references to Exists
aspire (131)
Acquisition\InstallationCandidateSources.cs (3)
66else if (Directory.Exists(releaseDir)) 86if (Directory.Exists(dogfoodRoot)) 144if (!Directory.Exists(toolStore))
Agents\AspireSkills\AspireSkillsInstaller.cs (8)
593if (!Directory.Exists(versionCacheDirectory)) 664if (!Directory.Exists(cacheDirectory)) 805if (Directory.Exists(targetDir)) 809if (Directory.Exists(targetDir)) 967if (!Directory.Exists(cacheRoot)) 1017if (!Directory.Exists(directory)) 1067return Directory.Exists(Path.Combine(versionCacheDirectory, "skills")) || 1146if (Directory.Exists(directory))
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (1)
130if (Directory.Exists(claudeCodePath) && !string.Equals(currentDirectory.FullName, homeDirectory.FullName, StringComparison.OrdinalIgnoreCase))
Agents\Copilot\CopilotAgentEnvironmentScanner.cs (1)
169if (!Directory.Exists(configDirectory))
Agents\Copilot\CopilotAppInstallationDetector.cs (2)
71.FirstOrDefault(Directory.Exists); 126if (!Directory.Exists(applicationsDirectory))
Agents\Playwright\PlaywrightCliInstaller.cs (7)
260if (Directory.Exists(tempDir)) 313if (Directory.Exists(dir)) 330if (!Directory.Exists(primarySkillDir)) 373if (!Directory.Exists(skillDir)) 406&& Directory.Exists(parent) 439if (Directory.Exists(targetDir)) 456if (Directory.Exists(dir) && Directory.GetFileSystemEntries(dir).Length == 0)
Agents\Playwright\PlaywrightCliRunner.cs (1)
141if (Directory.Exists(playwrightDir) && Directory.GetFileSystemEntries(playwrightDir).Length == 0)
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (1)
157if (Directory.Exists(vsCodePath) && !string.Equals(currentDirectory.FullName, homeDirectory.FullName, StringComparison.OrdinalIgnoreCase))
Backchannel\AppHostConnectionResolver.cs (1)
104var explicitDirectory = Directory.Exists(projectFile.FullName);
Bundles\BundleService.cs (7)
356if (Directory.Exists(activeVersionDir)) 527if (Directory.Exists(linkPath) && !ReparsePoint.IsReparsePoint(linkPath)) 593if (!Directory.Exists(versionDir)) 601if (!Directory.Exists(managedDir) || !File.Exists(managedExe)) 621if (!Directory.Exists(dcpDir) || !File.Exists(dcpExe)) 636if (!Directory.Exists(versionsRoot)) 740if (!Directory.Exists(legacyPath))
Certificates\CertificateGeneration\CertificateManager.cs (1)
442if (!string.IsNullOrEmpty(exportDir) && !Directory.Exists(exportDir))
Certificates\CertificateGeneration\MacOSCertificateManager.cs (2)
434if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(s_macOSUserHttpsCertificateLocation)) 485if (!Directory.Exists(s_macOSUserHttpsCertificateLocation))
Certificates\CertificateGeneration\UnixCertificateManager.cs (6)
848if (!Directory.Exists(nssDb)) 876if (!Directory.Exists(homeDirectory)) 884if (Directory.Exists(chromiumNssDb)) 892if (Directory.Exists(chromiumSnapNssDb)) 898if (Directory.Exists(firefoxDir)) 908if (Directory.Exists(firefoxSnapDir))
Certificates\CertificateHelpers.cs (3)
70if (Directory.Exists(openSslCertsDir)) 78if (Directory.Exists("/etc/ssl/certs")) 83if (Directory.Exists("/etc/pki/tls/certs"))
Commands\AgentInitCommand.cs (2)
169if (!Directory.Exists(path)) 678if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
Commands\InitCommand.cs (1)
384if (Directory.Exists(appHostDirPath))
Commands\ResourceCommand.cs (1)
687if (Directory.Exists(appHostProjectFile.FullName))
Commands\RestoreCommand.cs (1)
251if (Directory.Exists(passedAppHostProjectFile.FullName))
Commands\Sdk\SdkDumpCommand.cs (2)
257if (Directory.Exists(tempDir)) 336if (Directory.Exists(tempDir))
Commands\Sdk\SdkExportCommand.cs (1)
258if (Directory.Exists(tempDirectoryPath))
Commands\Sdk\SdkGenerateCommand.cs (1)
200if (Directory.Exists(tempDir))
Commands\StopCommand.cs (1)
173var projectOptionSpecifiedAsDirectory = Directory.Exists(passedAppHostProjectFile.FullName);
Commands\UpdateCommand.cs (1)
956if (Directory.Exists(directory))
DotNet\DotNetCliRunner.cs (2)
486if (Directory.Exists(sdkInstallPath)) 1202if (!Directory.Exists(sourcePath))
Git\GitWorktree.cs (5)
63if (Directory.Exists(gitPath)) 147if (Directory.Exists(gitPath)) 194if (Directory.Exists(fullPath)) 206!Directory.Exists(adminDirectory)) 374if (!File.Exists(candidate) && !Directory.Exists(candidate))
Layout\LayoutDiscovery.cs (12)
108if (string.IsNullOrEmpty(aspireHome) || !Directory.Exists(aspireHome)) 127if (!string.IsNullOrEmpty(envPath) && Directory.Exists(envPath)) 162if (!Directory.Exists(layoutPath)) 257_logger.LogDebug(" {Dir}/{Managed}/: {Exists}", BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName, Directory.Exists(bundleManagedPath) ? "exists" : "MISSING"); 258_logger.LogDebug(" {Dir}/{Dcp}/: {Exists}", BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName, Directory.Exists(bundleDcpPath) ? "exists" : "MISSING"); 260if (Directory.Exists(bundleManagedPath) && Directory.Exists(bundleDcpPath)) 286_logger.LogDebug(" {Dir}/: {Exists}", BundleDiscovery.ManagedDirectoryName, Directory.Exists(managedPath) ? "exists" : "MISSING"); 287_logger.LogDebug(" {Dir}/: {Exists}", BundleDiscovery.DcpDirectoryName, Directory.Exists(dcpPath) ? "exists" : "MISSING"); 289if (!Directory.Exists(managedPath) || !Directory.Exists(dcpPath)) 346!Directory.Exists(dcpPath) ||
Mcp\Tools\ListIntegrationsTool.cs (1)
161if (!string.IsNullOrEmpty(appHostDirectory) && Directory.Exists(appHostDirectory))
Migrations\TypeScriptAppHostMigration.cs (1)
183if (Directory.Exists(legacyModulesDir))
Npm\NpmRunner.cs (1)
191if (Directory.Exists(tempDir))
Packaging\PackageChannel.cs (1)
702if (normalizedSource is null || !Directory.Exists(normalizedSource))
Packaging\PackageMapping.cs (1)
24Directory.Exists(localDirectory);
Packaging\PackageSourceOverrideMappings.cs (1)
41return Directory.Exists(localDirectory) ? null : localDirectory;
Profiling\ProfileCaptureOptions.cs (1)
83if (Directory.Exists(outputPath) || Path.EndsInDirectorySeparator(outputPath))
Projects\AppHostServerClosureSnapshots.cs (6)
347if (!Directory.Exists(_stagingDirectory)) 382if (!Directory.Exists(layoutPath) || 383!Directory.Exists(libsPath) || 508return Directory.Exists(layoutPath); 514if (!Directory.Exists(layoutPath)) 533if (!Directory.Exists(path))
Projects\DotNetAppHostProject.cs (1)
2671Directory.Exists(path) &&
Projects\DotNetBasedAppHostServerProject.cs (1)
496if (Directory.Exists(objPath))
Projects\GuestRuntime.cs (2)
350if (!File.Exists(path) && !Directory.Exists(path)) 382if (!Directory.Exists(path))
Projects\JavaAppHostToolchainResolver.cs (2)
207if (Directory.Exists(gitPath) || File.Exists(gitPath)) 501if (Directory.Exists(dependencyDirectory))
Projects\PrebuiltAppHostServer.cs (1)
1303!Directory.Exists(localDirectory))
Projects\ProjectLocator.cs (1)
889if (Directory.Exists(projectFile.FullName))
Scaffolding\ScaffoldingService.cs (1)
556if (File.Exists(filePath) || Directory.Exists(filePath))
src\Shared\AppHostSocketManager.cs (1)
154.Where(socketDirectory => Directory.Exists(socketDirectory.DirectoryPath))
src\Shared\BackchannelConstants.cs (2)
518if (!Directory.Exists(directory)) 539if (!Directory.Exists(directory))
src\Shared\BundleDiscovery.cs (3)
130if (string.IsNullOrEmpty(baseDirectory) || !Directory.Exists(baseDirectory)) 161if (string.IsNullOrEmpty(baseDirectory) || !Directory.Exists(baseDirectory)) 360if (!string.IsNullOrEmpty(baseDir) && Directory.Exists(baseDir))
src\Shared\BundleVersionLease.cs (1)
99if (!Directory.Exists(fullVersionDirectory))
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
src\Shared\UserSecrets\IsolatedUserSecretsHelper.cs (2)
37if (!string.IsNullOrEmpty(isolatedSecretsDir) && !Directory.Exists(isolatedSecretsDir)) 70if (!string.IsNullOrEmpty(secretsDir) && Directory.Exists(secretsDir))
src\Shared\UserSecrets\SecretsStore.cs (1)
74if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
Telemetry\InternalMicrosoftDetector.cs (1)
1555if (!Directory.Exists(directory))
Templating\CliTemplateFactory.EmptyTemplate.cs (1)
50if (!Directory.Exists(outputPath))
Templating\CliTemplateFactory.GoStarterTemplate.cs (1)
43if (!Directory.Exists(outputPath))
Templating\CliTemplateFactory.JavaStarterTemplate.cs (1)
43if (!Directory.Exists(outputPath))
Templating\CliTemplateFactory.PythonStarterTemplate.cs (1)
45if (!Directory.Exists(outputPath))
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (1)
44if (!Directory.Exists(outputPath))
Templating\DotNetTemplateFactory.cs (1)
104if (Directory.Exists(sdkInstallPath))
Templating\OutputPathHelper.cs (1)
170return Path.IsPathRooted(fullPath) && Directory.Exists(fullPath) && Directory.EnumerateFileSystemEntries(fullPath).Any();
Utils\AspireRepositoryDetector.cs (2)
69if (!string.IsNullOrEmpty(envRoot) && Directory.Exists(envRoot)) 112if (Directory.Exists(fullPath))
Utils\CliDownloader.cs (1)
90if (Directory.Exists(tempDir))
Utils\CliPathHelper.cs (1)
316if (!Directory.Exists(socketDirectory))
Utils\ConfigurationHelper.cs (1)
247if (directory is not null && !Directory.Exists(directory))
Utils\DotNetToolDetection.cs (1)
156if (!Directory.Exists(storeDirectory))
Utils\EnvironmentChecker\DcpConnectionChecker.cs (1)
251if (Directory.Exists(extensionsPath))
Utils\EnvironmentChecker\DevCertsCheck.cs (1)
271if (!Directory.Exists(trustPath))
Utils\EnvironmentChecker\VsCodeExtensionCheck.cs (1)
170if (!Directory.Exists(extensionsDirectory))
Utils\FileDeleteHelper.cs (2)
30if (!Directory.Exists(path)) 103if (!Directory.Exists(directory))
Utils\FileSystemHelper.cs (1)
97if (!Directory.Exists(root) || patterns.Length == 0)
Utils\FirstTimeUseNoticeSentinel.cs (1)
39if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
Utils\ReparsePoint.cs (2)
20/// transparent to <see cref="Directory.Exists(string)"/> and file enumeration. 107return Directory.Exists(path) || File.Exists(path);
aspire-managed (5)
NuGet\Commands\NuGetPackageAssetResolver.cs (1)
148if (!Directory.Exists(packagePath))
src\Shared\BundleDiscovery.cs (3)
130if (string.IsNullOrEmpty(baseDirectory) || !Directory.Exists(baseDirectory)) 161if (string.IsNullOrEmpty(baseDirectory) || !Directory.Exists(baseDirectory)) 360if (!string.IsNullOrEmpty(baseDir) && Directory.Exists(baseDir))
src\Shared\BundleVersionLease.cs (1)
99if (!Directory.Exists(fullVersionDirectory))
Aspire.Acquisition.Tests (20)
Scripts\Common\FakeArchiveHelper.cs (2)
55if (Directory.Exists(contentDir)) 138if (Directory.Exists(contentDir))
Scripts\Common\ScriptHostFixture.cs (1)
39if (!Directory.Exists(_scriptsDirectory))
Scripts\Common\TestEnvironment.cs (1)
297if (Directory.Exists(TempDirectory))
Scripts\PRScriptFunctionTests.cs (3)
242Assert.True(Directory.Exists(tempDir), "Directory should be retained when KEEP_ARCHIVE=true"); 262Assert.False(Directory.Exists(tempDir), "Directory should be deleted when KEEP_ARCHIVE=false"); 282Assert.True(Directory.Exists(tempDir), "Directory should be retained during dry run");
Scripts\PRScriptPowerShellTests.cs (2)
625if (Directory.Exists(aspireRoot)) 703if (Directory.Exists(dogfoodRoot))
Scripts\PRScriptPSFunctionTests.cs (3)
273Assert.True(Directory.Exists(tempDir), "Directory should be retained when KeepArchive is true"); 293Assert.False(Directory.Exists(tempDir), "Directory should be deleted when KeepArchive is false"); 313Assert.True(Directory.Exists(tempDir), "Directory should be retained during WhatIf");
Scripts\PRScriptShellTests.cs (2)
692if (Directory.Exists(aspireRoot)) 779if (Directory.Exists(dogfoodRoot))
Scripts\PRScriptToolModeTests.cs (4)
445Assert.True(Directory.Exists(prHive), $"Hive should be populated at {prHive}."); 511Assert.True(Directory.Exists(prHive), $"Hive should be populated at {prHive}."); 1021Assert.True(Directory.Exists(prHive), $"Hive should be populated at {prHive}."); 1055Assert.True(Directory.Exists(prHive), $"Hive should be populated at {prHive}.");
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
258if (!Directory.Exists(WorkingDirectory))
Aspire.Cli.EndToEnd.Tests (30)
DotnetToolSmokeTests.cs (1)
134if (!string.IsNullOrEmpty(builtNugetsPath) && Directory.Exists(builtNugetsPath))
Helpers\CaptureWorkspaceOnFailureAttribute.cs (3)
66Directory.Exists(path)) 87Directory.Exists(workspacePath)) 98Directory.Exists(path))
Helpers\CliE2ETestHelpers.cs (2)
1011.FirstOrDefault(directory => Directory.Exists(directory) && 1087foreach (var directory in shippingDirectories.Where(Directory.Exists))
Helpers\TerminalRun.cs (2)
87if (!Directory.Exists(diagnosticsSource)) 120if (!Directory.Exists(source))
Helpers\TypeScriptAppHostToolchainTestHelpers.cs (1)
59if (Directory.Exists(nodeModulesPath))
JavaCodegenValidationTests.cs (1)
53if (!Directory.Exists(modulesDir))
ProjectReferenceTests.cs (3)
75if (Directory.Exists(hivesDir)) 82if (Directory.Exists(packagesDir)) 127if (Directory.Exists(modulesDir))
tests\Aspire.Hosting.TestUtilities\Utils\MSBuildUtils.cs (1)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\CliInstallStrategy.cs (3)
356if (!Directory.Exists(archiveDir)) 400if (!Directory.Exists(nupkgSourcePath)) 419if (!Directory.Exists(nupkgSourcePath))
tests\Shared\CliPackageDiscovery.cs (1)
86if (!Directory.Exists(packageDirectory))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
TypeScriptCodegenValidationTests.cs (2)
94if (!Directory.Exists(modulesDir)) 165if (!Directory.Exists(modulesDir))
TypeScriptLegacyAppHostTests.cs (3)
115if (Directory.Exists(modernModulesDir)) 173if (!Directory.Exists(legacyModulesDir)) 182if (Directory.Exists(modernModulesDir))
TypeScriptMigrateAppHostTests.cs (3)
105if (Directory.Exists(modernModulesDir)) 182if (Directory.Exists(legacyModulesDir)) 190if (!Directory.Exists(modernModulesDir))
TypeScriptReusablePackageTests.cs (1)
70Assert.True(Directory.Exists(helperModulesDirectory), $".aspire/modules directory was not created for helper package at {helperModulesDirectory}");
TypeScriptStarterSmokeTests.cs (1)
54if (!Directory.Exists(modulesDir))
TypeScriptStarterTemplateTests.cs (1)
41if (!Directory.Exists(modulesDir))
Aspire.Cli.Tests (142)
Agents\AspireSkillsBundleTests.cs (1)
81if (Directory.Exists(bundleDirectory))
Agents\AspireSkillsInstallerTests.cs (18)
52Assert.True(Directory.Exists(cachedBundleDirectory)); 341Assert.True(Directory.Exists(staleCachedBundleDirectory)); 401Assert.True(Directory.Exists(oldCachedBundleDirectory)); 458Assert.False(Directory.Exists(Path.Combine(cachedBundleDirectory, "skills"))); 533Assert.True(Directory.Exists(cachedBundleDirectory)); 576Assert.True(Directory.Exists(staleCacheDirectory)); 621Assert.False(Directory.Exists(staleVersionDirectory)); 668Assert.False(Directory.Exists(staleVersionDirectory)); 733Assert.True(Directory.Exists(staleCacheDirectory)); 790Assert.True(Directory.Exists(staleCacheDirectory)); 800Assert.False(Directory.Exists(staleCacheDirectory)); 850Assert.True(Directory.Exists(currentCacheDirectory)); 851Assert.False(Directory.Exists(staleCacheDirectory)); 852Assert.True(Directory.Exists(recentCacheDirectory)); 967Assert.All(staleDirectories, directory => Assert.False(Directory.Exists(directory))); 968Assert.All(recentDirectories, directory => Assert.True(Directory.Exists(directory))); 1030Assert.True(Directory.Exists(activeTemporaryDirectory)); 1036Assert.False(Directory.Exists(activeTemporaryDirectory));
Agents\CopilotAgentEnvironmentScannerTests.cs (1)
111Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".copilot")));
Agents\PlaywrightCliInstallerTests.cs (40)
46if (Directory.Exists(tempDir)) 81if (Directory.Exists(tempDir)) 115if (Directory.Exists(tempDir)) 150if (Directory.Exists(tempDir)) 181if (Directory.Exists(tempDir)) 223if (Directory.Exists(repoRoot)) 267if (Directory.Exists(repoRoot)) 310if (Directory.Exists(repoRoot)) 360if (Directory.Exists(repoRoot)) 424if (Directory.Exists(tempDir)) 457if (Directory.Exists(tempDir)) 502if (Directory.Exists(repoRoot)) 542if (Directory.Exists(tempDir)) 583if (Directory.Exists(tempDir)) 612if (Directory.Exists(tempDir)) 671if (Directory.Exists(tempDir)) 705Assert.False(Directory.Exists(Path.Combine(targetDir, "stale-dir"))); 709if (Directory.Exists(tempDir)) 758Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude", "skills", "playwright-cli"))); 762if (Directory.Exists(tempDir)) 806Assert.True(Directory.Exists(preExistingDir)); 810if (Directory.Exists(tempDir)) 855Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude", "skills"))); 857Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude"))); 861if (Directory.Exists(tempDir)) 887Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude", "skills"))); 888Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude"))); 889Assert.True(Directory.Exists(tempDir)); // stop dir should NOT be deleted 893if (Directory.Exists(tempDir)) 920Assert.True(Directory.Exists(Path.Combine(tempDir, ".claude", "skills"))); 921Assert.True(Directory.Exists(Path.Combine(tempDir, ".claude", "skills", "other-skill"))); 925if (Directory.Exists(tempDir)) 951Assert.False(Directory.Exists(Path.Combine(tempDir, ".agents"))); 953Assert.True(Directory.Exists(tempDir)); 957if (Directory.Exists(tempDir)) 986Assert.False(Directory.Exists(Path.Combine(tempDir, "a", "b", "c", "d"))); 987Assert.False(Directory.Exists(Path.Combine(tempDir, "a", "b", "c"))); 988Assert.False(Directory.Exists(Path.Combine(tempDir, "a", "b"))); 990Assert.True(Directory.Exists(Path.Combine(tempDir, "a"))); 994if (Directory.Exists(tempDir))
Agents\TelemetryHookConfiguratorTests.cs (4)
74Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot"))); 237Assert.False(Directory.Exists(Path.Combine(home.FullName, ".aspire", "hooks"))); 238Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot"))); 239Assert.False(Directory.Exists(Path.Combine(home.FullName, ".claude")));
BundleServiceIntegrationTests.cs (13)
50Assert.True(Directory.Exists(versionsDir)); 212Assert.False(Directory.Exists(Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName))); 240Assert.False(Directory.Exists(sourcePath)); 241Assert.True(Directory.Exists(destinationPath)); 287Assert.True(Directory.Exists(v1VersionDir), "Leased stale version should not be deleted during upgrade cleanup."); 308Assert.True(Directory.Exists(staleVersionDir)); 323Assert.False(Directory.Exists(staleVersionDir)); 349Assert.True(Directory.Exists(staleVersionDir)); 481Directory.Exists(Path.Combine(binaryDir, BundleDiscovery.BundleDirectoryName)), 484Directory.Exists(Path.Combine(Path.GetDirectoryName(binaryDir)!, BundleDiscovery.BundleDirectoryName)), 531Assert.True(Directory.Exists(Path.Combine(dest, BundleDiscovery.DcpDirectoryName))); 667if (!Directory.Exists(managedDir) || !File.Exists(managedExe) || !Directory.Exists(dcpDir) || !File.Exists(dcpExe))
BundleServiceTests.cs (1)
207Assert.True(Directory.Exists(Path.Combine(versionsRoot, active)));
Caching\AppHostInfoDiskCacheTests.cs (2)
59return Directory.Exists(cacheDirectory) ? Directory.EnumerateFiles(cacheDirectory) : []; 213Assert.False(Directory.Exists(cacheDir) && Directory.EnumerateFiles(cacheDir).Any());
Commands\AgentInitCommandTests.cs (5)
476Assert.False(Directory.Exists(agentsDir), $"Expected no .agents directory but found {agentsDir}"); 580Assert.False(Directory.Exists(aspireSkillPath), $"Expected only the selected skill but found {aspireSkillPath}"); 733Assert.False(Directory.Exists(aspireSkillPath), $"Expected no aspire skill directory but found {aspireSkillPath}"); 837Assert.False(Directory.Exists(agentsDir), $"Expected no agents/skills directory but found {agentsDir}"); 859Assert.False(Directory.Exists(aspireifySkillPath), $"Expected no aspireify skill directory but found {aspireifySkillPath}");
Commands\CacheCommandTests.cs (2)
116Assert.False(Directory.Exists(Path.Combine(stagingCacheRoot.FullName, "deadbeef"))); 117Assert.False(Directory.Exists(Path.Combine(stagingCacheRoot.FullName, "cafef00d")));
Commands\ExportCommandTests.cs (1)
138Assert.True(Directory.Exists(customDir), "Nested output directory should be created automatically");
Commands\InitCommandTests.cs (4)
771Assert.False(Directory.Exists(aspireSkillPath), $"Expected no aspire skill directory but found {aspireSkillPath}"); 774Assert.False(Directory.Exists(aspireifySkillPath), $"Expected no aspireify skill directory but found {aspireifySkillPath}"); 794Assert.False(Directory.Exists(agentsDir), $"Expected no agents/skills directory but found {agentsDir}"); 817Assert.False(Directory.Exists(aspireifySkillPath), $"Expected no aspireify skill directory but found {aspireifySkillPath}");
Commands\IntegrationAssemblyNameResolverTests.cs (1)
67if (Directory.Exists(Path))
Commands\NewCommandTests.cs (4)
1401Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output"))); 1436Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output"))); 2293Assert.False(Directory.Exists(agentsDir), $"Expected no agents/skills directory but found {agentsDir}"); 2321Assert.False(Directory.Exists(aspireifySkillPath), $"Expected no aspireify skill directory but found {aspireifySkillPath}");
Commands\RunCommandTests.cs (1)
4350if (Directory.Exists(originalSecretsDir) && !Directory.EnumerateFileSystemEntries(originalSecretsDir).Any())
Commands\SdkDumpCommandTests.cs (2)
286Assert.False(Directory.Exists(scannerPath)); 362if (Directory.Exists(tempDirectory))
Git\GitWorktreeTests.cs (1)
125if (!Directory.Exists(caseVariantRoot))
Mcp\AppHostConnectionSelectionLogicTests.cs (1)
74Assert.SkipWhen(Directory.Exists(secondDirectoryPath),
Migrations\TypeScriptAppHostMigrationTests.cs (2)
215Assert.False(Directory.Exists(Path.Combine(root.FullName, ".modules"))); 235Assert.False(Directory.Exists(Path.Combine(appHostDirectory.FullName, ".modules")));
ProfileCaptureServiceTests.cs (1)
338Assert.True(Directory.Exists(Path.GetDirectoryName(outputPath)));
Projects\AppHostServerProjectTests.cs (2)
381if (isSafeToDelete && Directory.Exists(project.ProjectModelPath)) 496if (Directory.Exists(project.ProjectModelPath))
Projects\GuestAppHostProjectTests.cs (1)
1623Assert.False(Directory.Exists(Path.Combine(_workspace.WorkspaceRoot.FullName, "bundles")));
Projects\JavaAppHostToolchainResolverTests.cs (3)
766Assert.False(Directory.Exists(dependencyDirectory)); 777Assert.False(Directory.Exists(Path.Combine(workspace.Path, "target"))); 795Assert.True(Directory.Exists(dependencyDirectory));
Projects\PrebuiltAppHostServerTests.cs (6)
591if (isSafeToDelete && Directory.Exists(workingDirectory)) 628if (Directory.Exists(dir)) 1853Assert.False(Directory.Exists(missingPackageSource)); 2580Assert.True(Directory.Exists(firstLayoutPath)); 2581Assert.True(Directory.Exists(secondLayoutPath)); 3022if (Directory.Exists(workingDirectory))
Secrets\SecretsStoreTests.cs (1)
20if (Directory.Exists(_tempDir))
Templating\JavaAppHostTemplateTests.cs (1)
150Assert.False(File.Exists(path) || Directory.Exists(path), $"Did not expect a Maven build or wrapper path at {path}");
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Utils\AspireRepositoryDetectorTests.cs (1)
30if (Directory.Exists(directory))
Utils\CliTestHelperTests.cs (1)
32Assert.False(Directory.Exists(workspacePath), "Workspace directory should be deleted after disposal");
Utils\FileSystemHelperTests.cs (6)
27Assert.True(Directory.Exists(destDir)); 57Assert.True(Directory.Exists(destDir)); 59Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1"))); 61Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1", "subdir2"))); 81Assert.True(Directory.Exists(destDir)); 196Assert.True(Directory.Exists(currentDest));
Utils\FirstTimeUseNoticeSentinelTests.cs (1)
90Assert.True(Directory.Exists(cliDir));
Utils\IsolatedUserSecretsHelperTests.cs (2)
120Assert.True(Directory.Exists(secretsDir)); 127Assert.False(Directory.Exists(secretsDir));
Utils\ReparsePointTests.cs (7)
26Assert.True(Directory.Exists(link)); 89Assert.True(Directory.Exists(real)); 126Assert.False(Directory.Exists(link)); 140Assert.False(Directory.Exists(dir)); 222Assert.True(Directory.Exists(link)); 255Assert.True(Directory.Exists(nestedThroughLink)); 292Assert.False(Directory.Exists(link));
Utils\TemporaryWorkspaceTests.cs (4)
17Assert.True(Directory.Exists(workspacePath)); 21Assert.False(Directory.Exists(workspacePath)); 37Assert.True(Directory.Exists(workspacePath)); 41if (Directory.Exists(workspacePath))
Aspire.Dashboard (5)
ServiceClient\DashboardRunStore.cs (5)
322if (!_metadataPublished || _runsDirectory is null || !Directory.Exists(_runsDirectory)) 359if (SupportsRunSelection && Directory.Exists(_runsDirectory)) 417else if (_temporaryDirectory is not null && Directory.Exists(_temporaryDirectory)) 421else if (PersistenceMode == DashboardPersistenceMode.Run && Directory.Exists(CurrentWorkingDirectory)) 534if (!Directory.Exists(runDirectory))
Aspire.Dashboard.Components.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Dashboard.Tests (25)
Model\DashboardDataSourceTests.cs (22)
41Assert.False(Directory.Exists(Path.Combine(workspace.Path, applicationDirectoryName))); 266Assert.False(Directory.Exists(runDirectory)); 304Assert.Equal(persistenceMode == DashboardPersistenceMode.Resume, Directory.Exists(runDirectory)); 306if (Directory.Exists(runDirectory)) 310Assert.False(Directory.Exists(runDirectory)); 314if (runDirectory is not null && Directory.Exists(runDirectory)) 332Assert.False(Directory.Exists(abandonedDirectory)); 336if (Directory.Exists(abandonedDirectory)) 354Assert.True(Directory.Exists(activeRunStore.CurrentWorkingDirectory)); 355Assert.True(Directory.Exists(secondRunStore.CurrentWorkingDirectory)); 369Assert.True(Directory.Exists(otherDirectory)); 373if (Directory.Exists(otherDirectory)) 673Assert.False(Directory.Exists(historicalRunDirectories[^1])); 674Assert.All(historicalRunDirectories[..^1], directory => Assert.True(Directory.Exists(directory))); 675Assert.True(Directory.Exists(currentRunStore.CurrentWorkingDirectory)); 768Assert.All(pinnedRunDirectories, directory => Assert.True(Directory.Exists(directory))); 793Assert.True(Directory.Exists(activeRunStore.CurrentWorkingDirectory)); 835Assert.True(Directory.Exists(historicalRunDirectory)); 959Assert.True(Directory.Exists(expiredRunDirectory)); 960Assert.True(Directory.Exists(currentRunStore.CurrentWorkingDirectory)); 1007Assert.False(Directory.Exists(malformedRunDirectory)); 1357if (!Directory.Exists(runDirectory))
tests\Shared\Playwright\PlaywrightProvider.cs (1)
56if (Directory.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Deployment.EndToEnd.Tests (5)
tests\Shared\CliInstallStrategy.cs (3)
356if (!Directory.Exists(archiveDir)) 400if (!Directory.Exists(nupkgSourcePath)) 419if (!Directory.Exists(nupkgSourcePath))
tests\Shared\CliPackageDiscovery.cs (1)
86if (!Directory.Exists(packageDirectory))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.EndToEnd.Tests (11)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
56if (Directory.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\AspireProject.cs (1)
60if (Directory.Exists(dir))
tests\Shared\TemplatesTesting\BuildEnvironment.cs (6)
83if (Directory.Exists(sdkFromArtifactsPath)) 150if (string.IsNullOrEmpty(EnvironmentVariables.BuiltNuGetsPath) || !Directory.Exists(EnvironmentVariables.BuiltNuGetsPath)) 157if (!Directory.Exists(TestAssetsPath)) 226if (Directory.Exists(NuGetPackagesPath)) 233if (NuGetPackagesPath is not null && Directory.Exists(NuGetPackagesPath)) 249if (!Directory.Exists(TestRootPath))
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
64if (Directory.Exists(_customHiveDirectory))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
258if (!Directory.Exists(WorkingDirectory))
Aspire.Hosting (22)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
143if (Directory.Exists(fullPath))
ContainerResourceBuilderExtensions.cs (1)
1500if (!Directory.Exists(sourceFullPath) && !File.Exists(sourceFullPath))
Dcp\ExecutableConfigurationResolver.cs (1)
65ContainerCertificatePathsAnnotation.DefaultCertificateDirectoriesPaths.Where(Directory.Exists));
Devcontainers\DevcontainerSettingsWriter.cs (2)
227if (Directory.Exists(vscodeServerPath)) 232if (Directory.Exists(vscodeInsidersServerPath))
DistributedApplicationOptions.cs (1)
182if (Directory.Exists(fullPath))
Lifecycle\TerminalHostOrphanCleanupService.cs (1)
232if (!Directory.Exists(trmnlDirectory))
ProjectResourceBuilderExtensions.cs (1)
431var message = Directory.Exists(projectPath)
Publishing\ManifestPublisher.cs (1)
49if (!Directory.Exists(parentDirectory!.FullName))
Publishing\ManifestPublishingExtensions.cs (1)
58if (!Directory.Exists(parentDirectory!.FullName))
src\Shared\AppHostSocketManager.cs (1)
154.Where(socketDirectory => Directory.Exists(socketDirectory.DirectoryPath))
src\Shared\BackchannelConstants.cs (2)
518if (!Directory.Exists(directory)) 539if (!Directory.Exists(directory))
src\Shared\BundleDiscovery.cs (3)
130if (string.IsNullOrEmpty(baseDirectory) || !Directory.Exists(baseDirectory)) 161if (string.IsNullOrEmpty(baseDirectory) || !Directory.Exists(baseDirectory)) 360if (!string.IsNullOrEmpty(baseDir) && Directory.Exists(baseDir))
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
src\Shared\ProjectPathResolver.cs (1)
18if (Directory.Exists(path))
UserSecrets\UserSecretsManagerFactory.cs (1)
232if (!string.IsNullOrEmpty(directoryName) && !Directory.Exists(directoryName))
Utils\FileSystemService.cs (2)
208if (Directory.Exists(_path)) 271if (parentDir is not null && Directory.Exists(parentDir))
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
418if (Directory.Exists(path))
Aspire.Hosting.Azure.Kubernetes.Tests (1)
AzureKubernetesPersistentVolumeTests.cs (1)
68Assert.True(Directory.Exists(expectedPath));
Aspire.Hosting.Blazor (1)
BlazorGatewayExtensions.cs (1)
357if (Directory.Exists(outputDir))
Aspire.Hosting.Blazor.Tests (4)
EndpointsManifestTransformerTests.cs (1)
20if (Directory.Exists(_tempDir))
tests\Shared\TestFileSystemService.cs (3)
47if (Directory.Exists(dir)) 68if (Directory.Exists(path)) 88if (Directory.Exists(parentDir))
Aspire.Hosting.Browsers (4)
ChromiumBrowserResolver.cs (4)
57if (!Directory.Exists(userDataDirectory)) 136if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)) || 160if (!Directory.Exists(userDataDirectory)) 292if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)))
Aspire.Hosting.Browsers.Tests (4)
src\Aspire.Hosting.Browsers\ChromiumBrowserResolver.cs (4)
57if (!Directory.Exists(userDataDirectory)) 136if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)) || 160if (!Directory.Exists(userDataDirectory)) 292if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)))
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Hosting.Dotnet (4)
DotnetProjectHostingExtensions.cs (1)
399var message = Directory.Exists(projectPath)
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
src\Shared\ProjectPathResolver.cs (1)
18if (Directory.Exists(path))
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectBuildEnvironmentTests.cs (1)
49Assert.False(Directory.Exists(responseFileDirectory));
Aspire.Hosting.Java (4)
JavaBuildToolResolver.cs (1)
100if (Directory.Exists(gitPath) || File.Exists(gitPath))
JavaHostingExtensions.cs (1)
1900if (outputDirectory is null || !Directory.Exists(outputDirectory))
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Java.Tests (1)
AddJavaAppPublishTests.cs (1)
1870Assert.False(Directory.Exists(Path.Combine(stagingDirectory, "lib")));
Aspire.Hosting.JavaScript (4)
JavaScriptHostingExtensions.cs (2)
2569var hasYarnBerryDir = Directory.Exists(Path.Combine(workingDirectory, ".yarn")); 3213if (Directory.Exists(candidate))
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.JavaScript.Tests (1)
AddViteAppTests.cs (1)
859Assert.True(Directory.Exists(expectedDir), $"Expected .aspire directory at {expectedDir}");
Aspire.Hosting.Kubernetes.Tests (10)
KubernetesGatewayTests.cs (3)
35Assert.True(Directory.Exists(gatewayDir), $"Gateway templates dir not found at {gatewayDir}"); 357Assert.False(Directory.Exists(gatewayDir), $"Gateway directory should not exist at {gatewayDir}"); 435Assert.True(Directory.Exists(templatesDir));
KubernetesIngressTests.cs (4)
394Assert.False(Directory.Exists(ingressDir), $"Ingress directory should not exist at {ingressDir}"); 460Assert.False(Directory.Exists(ingressDir), $"Ingress directory should not exist at {ingressDir}"); 557Assert.False(Directory.Exists(ingressDir), $"Ingress directory should not exist at {ingressDir}"); 577Assert.True(Directory.Exists(templatesDir));
KubernetesPersistentVolumeRunModeTests.cs (2)
32Assert.False(Directory.Exists(expectedPath)); 39Assert.True(Directory.Exists(expectedPath));
KubernetesPublisherTests.cs (1)
1814Assert.False(Directory.Exists(localPath));
Aspire.Hosting.Maui (2)
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (2)
785if (Directory.Exists(venvPath)) 1517if (Directory.Exists(venvPath))
Aspire.Hosting.Python.Tests (6)
AddPythonAppTests.cs (6)
586if (Directory.Exists(appDirPath)) 590if (Directory.Exists(appHostVenvPath)) 635if (Directory.Exists(appDirPath)) 639if (Directory.Exists(appHostVenvPath)) 713if (Directory.Exists(appDirPath)) 717if (Directory.Exists(appHostVenvPath))
Aspire.Hosting.Radius (2)
Publishing\RadiusBicepPublishingContext.cs (1)
174if (Directory.Exists(root))
Publishing\RadiusDeploymentPipelineStep.cs (1)
326if (directory is not null && Directory.Exists(directory))
Aspire.Hosting.Radius.Tests (2)
Publishing\RadiusDeployParametersTests.cs (1)
96if (directory is not null && Directory.Exists(directory))
Secrets\SecretStoreValidationTests.cs (1)
25if (Directory.Exists(_sealedManifestDirectory))
Aspire.Hosting.RemoteHost (5)
AssemblyLoader.cs (4)
252if (string.IsNullOrWhiteSpace(directory) || !Directory.Exists(directory)) 349if (string.IsNullOrWhiteSpace(integrationLibsPath) || !Directory.Exists(integrationLibsPath)) 423if (!string.IsNullOrWhiteSpace(integrationLibsPath) && Directory.Exists(integrationLibsPath)) 427if (Directory.Exists(applicationBasePath))
JsonRpcServer.cs (1)
148if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
Aspire.Hosting.RemoteHost.Tests (9)
AssemblyLoaderTests.cs (1)
287if (Directory.Exists(Path))
CodeGeneration\ApiReferenceExportTests.cs (1)
306if (Directory.Exists(Path))
JsonRpcAuthenticationTests.cs (1)
154if (!string.IsNullOrEmpty(_socketDirectory) && Directory.Exists(_socketDirectory))
ManifestCommandTests.cs (4)
49Assert.False(Directory.Exists(Path.Combine(workspaceRoot, "libs"))); 73if (Directory.Exists(workspaceRoot)) 121Assert.False(Directory.Exists(Path.Combine(workspaceRoot, "restore", "libs"))); 139if (Directory.Exists(workspaceRoot))
RestoreCommandTests.cs (1)
79if (Directory.Exists(workspaceRoot))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Hosting.Rust (3)
RustDockerfileGenerator.cs (1)
279if (!File.Exists(candidate) && !Directory.Exists(candidate))
src\Shared\PathNormalizer.cs (2)
83if (!File.Exists(candidate) && !Directory.Exists(candidate)) 318if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Rust.Tests (1)
CargoMetadataTests.cs (1)
315Assert.False(Directory.Exists(Path.Combine(crate.Path, "target")));
Aspire.Hosting.Sdk.Tests (4)
AppHostSdkTargetsTests.cs (3)
751Assert.False(Directory.Exists(Path.Combine(workspace.Path, "nativeexpanded"))); 942Assert.False(Directory.Exists(Path.Combine(propertyAspireHome, "bundle"))); 1918while (directory is not null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Hosting.Tasks (2)
ResolveAspireCliBundle.cs (2)
304if (!Directory.Exists(storeRoot)) 340if (Directory.Exists(versionsRoot))
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (2)
216if (!string.IsNullOrEmpty(appHostProjectPath) && Directory.Exists(appHostProjectPath)) 345if (appHostPath is null || !Directory.Exists(appHostPath))
Aspire.Hosting.Testing.Tests (4)
tests\Aspire.Hosting.TestUtilities\Utils\MSBuildUtils.cs (1)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
118if (!Directory.Exists(_logFolder))
tests\Shared\Playwright\PlaywrightProvider.cs (1)
56if (Directory.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Hosting.Tests (57)
AspireStoreTests.cs (1)
19Assert.True(Directory.Exists(Path.GetDirectoryName(store.BasePath)));
Dashboard\DashboardEventHandlersTests.cs (4)
638if (Directory.Exists(tempDir)) 707if (Directory.Exists(tempDir)) 776if (Directory.Exists(tempDir)) 843if (Directory.Exists(tempDir))
Dcp\DcpExecutorTests.cs (2)
5483Assert.True(Directory.Exists(bundlesDirectory), $"Expected the custom bundle directory to exist at {bundlesDirectory}."); 5510.Where(Directory.Exists)
Dcp\KubernetesServiceTests.cs (1)
338if (Directory.Exists(_root))
DistributedApplicationBuilderTests.cs (9)
620if (Directory.Exists(legacyDirectory) && !Directory.EnumerateFileSystemEntries(legacyDirectory).Any()) 625Directory.Exists(canonicalDirectory) && 709if (Directory.Exists(currentDirectory) && !Directory.EnumerateFileSystemEntries(currentDirectory).Any()) 713if (Directory.Exists(legacyDirectory) && !Directory.EnumerateFileSystemEntries(legacyDirectory).Any()) 768if (Directory.Exists(currentDirectory) && !Directory.EnumerateFileSystemEntries(currentDirectory).Any()) 772if (Directory.Exists(legacyDirectory) && !Directory.EnumerateFileSystemEntries(legacyDirectory).Any()) 832if (Directory.Exists(currentDirectory) && !Directory.EnumerateFileSystemEntries(currentDirectory).Any()) 836if (Directory.Exists(legacyDirectory) && !Directory.EnumerateFileSystemEntries(legacyDirectory).Any()) 884if (Directory.Exists(currentDirectory) && !Directory.EnumerateFileSystemEntries(currentDirectory).Any())
FileSystemServiceTests.cs (22)
34Assert.True(Directory.Exists(tempDir.Path)); 45Assert.True(Directory.Exists(tempDir.Path)); 56Assert.True(Directory.Exists(path)); 60Assert.False(Directory.Exists(path)); 109Assert.True(Directory.Exists(parentDir)); 114Assert.False(Directory.Exists(parentDir)); 133Assert.True(Directory.Exists(extractedPath)); 181Assert.True(Directory.Exists(tempDir1.Path)); 182Assert.True(Directory.Exists(tempDir2.Path)); 225Assert.True(Directory.Exists(dirPath)); 231Assert.False(Directory.Exists(dirPath)); 245Assert.True(Directory.Exists(dirPath)); 252Assert.True(Directory.Exists(dirPath)); 268Assert.True(Directory.Exists(dirPath)); 274Assert.True(Directory.Exists(dirPath)); 320Assert.False(Directory.Exists(dir1Path)); 322Assert.True(Directory.Exists(dir2Path)); 328Assert.False(Directory.Exists(dir2Path)); 358Assert.False(Directory.Exists(dirPath)); 376Assert.True(Directory.Exists(parentDir)); 382Assert.False(Directory.Exists(parentDir)); 421Assert.True(Directory.Exists(tempDir.Path));
MSBuildTests.cs (3)
494Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName))); 522Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName))); 523Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName)));
Publishing\DeploymentStateManagerTests.cs (4)
394Assert.True(Directory.Exists(stateDirectory)); 418Assert.True(Directory.Exists(stateDirectory)); 1198Assert.False(Directory.Exists(legacyDirectory)); 1211Assert.False(Directory.Exists(legacyDirectory));
Publishing\ResourceContainerImageManagerTests.cs (1)
1577var actualArchives = Directory.Exists(outputPath)
tests\Shared\TestFileSystemService.cs (3)
47if (Directory.Exists(dir)) 68if (Directory.Exists(path)) 88if (Directory.Exists(parentDir))
UserSecretsParameterDefaultTests.cs (1)
378if (!string.IsNullOrEmpty(directoryName) && !Directory.Exists(directoryName))
WithTerminalTests.cs (2)
977Assert.False(Directory.Exists(publishDirectory)); 1364if (Directory.Exists(_terminalDirectory))
WithVolumeTests.cs (4)
53Assert.False(Directory.Exists(expectedProjectPath)); 54Assert.False(Directory.Exists(expectedExecutablePath)); 65Assert.True(Directory.Exists(expectedProjectPath)); 66Assert.True(Directory.Exists(expectedExecutablePath));
Aspire.Hosting.TestUtilities (5)
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
118if (!Directory.Exists(_logFolder))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Utils\MSBuildUtils.cs (1)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
Utils\PersistentContainerTestHelpers.cs (1)
75if (Path.GetDirectoryName(userSecretsPath) is { } userSecretsDirectory && Directory.Exists(userSecretsDirectory))
Utils\UnixSocketHelper.cs (1)
16if (!Directory.Exists(aspireCliPath))
Aspire.Managed.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
Aspire.Playground.Tests (2)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
56if (Directory.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Templates.Tests (15)
NewUpAndBuildSupportProjectTemplatesTests.cs (1)
27if (Directory.Exists(topLevelDir))
TemplateTestsBase.cs (3)
72Assert.True(Directory.Exists(testProjectDir), $"Expected tests project at {testProjectDir}"); 316Assert.False(Directory.Exists(testProjectDirectory), "Expected no tests project to be created"); 321Assert.True(Directory.Exists(testProjectDirectory), $"Expected tests project at {testProjectDirectory}");
tests\Shared\Playwright\PlaywrightProvider.cs (1)
56if (Directory.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\AspireProject.cs (1)
60if (Directory.Exists(dir))
tests\Shared\TemplatesTesting\BuildEnvironment.cs (6)
83if (Directory.Exists(sdkFromArtifactsPath)) 150if (string.IsNullOrEmpty(EnvironmentVariables.BuiltNuGetsPath) || !Directory.Exists(EnvironmentVariables.BuiltNuGetsPath)) 157if (!Directory.Exists(TestAssetsPath)) 226if (Directory.Exists(NuGetPackagesPath)) 233if (NuGetPackagesPath is not null && Directory.Exists(NuGetPackagesPath)) 249if (!Directory.Exists(TestRootPath))
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
64if (Directory.Exists(_customHiveDirectory))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
258if (!Directory.Exists(WorkingDirectory))
Aspire.TerminalHost.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
cdac-build-tool (1)
ComposeCommand.cs (1)
49if (!System.IO.Directory.Exists(baselinesDir))
crossgen2 (1)
parent\parent\Common\CommandLineHelpers.cs (1)
378if (Directory.Exists(directoryName))
csc (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
178if (Directory.Exists(loggingFilePath))
dotnet-aot (16)
NativeEntryPoint.cs (1)
88if (!Directory.Exists(sdkDirectory))
parent\dotnet\CommandFactory\CommandResolution\PublishedPathCommandResolver.cs (1)
67if (!Directory.Exists(publishDirectory))
parent\dotnet\Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
42Directory.Exists(p)
parent\dotnet\Commands\Test\MTP\ArtifactPostProcessingManager.cs (1)
220if (Directory.Exists(tempDirectory))
parent\dotnet\Commands\Test\MTP\TestModulesFilterHandler.cs (1)
46if (string.IsNullOrEmpty(_testModulesRoot) || !Directory.Exists(_testModulesRoot))
parent\dotnet\Commands\Workload\Install\FileBasedManifestInstaller.cs (3)
42if (Directory.Exists(extractionPath)) 51if (Directory.Exists(targetPath)) 60if (!string.IsNullOrEmpty(extractionPath) && Directory.Exists(extractionPath))
parent\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (2)
263if (Directory.Exists(versionDir) && !Directory.GetFileSystemEntries(versionDir).Any()) 267if (Directory.Exists(idDir) && !Directory.GetFileSystemEntries(idDir).Any())
parent\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (4)
17if (Directory.Exists(_workloadMetadataDir)) 21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any()) 33if (Directory.Exists(path)) 50if (pathDir != null && !Directory.Exists(pathDir))
parent\dotnet\SlnFileFactory.cs (1)
32if (Directory.Exists(slnFileOrDirectory))
parent\dotnet\Telemetry\DevDeviceIDGetter.cs (1)
125if (!Directory.Exists(directory))
dotnet-dev-certs (9)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
444if (!string.IsNullOrEmpty(exportDir) && !Directory.Exists(exportDir))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation)) 427if (!Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
849if (!Directory.Exists(nssDb)) 877if (!Directory.Exists(homeDirectory)) 885if (Directory.Exists(chromiumNssDb)) 893if (Directory.Exists(chromiumSnapNssDb)) 899if (Directory.Exists(firefoxDir)) 909if (Directory.Exists(firefoxSnapDir))
dotnet-format (4)
ReportWriter.cs (1)
16if (!string.IsNullOrEmpty(reportFolderPath) && !Directory.Exists(reportFolderPath))
Workspaces\FolderWorkspace.cs (1)
32if (string.IsNullOrEmpty(folderPath) || !Directory.Exists(folderPath))
Workspaces\MSBuildWorkspaceFinder.cs (2)
32return Directory.Exists(workspacePath) 97if (!Directory.Exists(searchBase))
dotnet-Microsoft.XmlSerializer.Generator (3)
Sgen.cs (3)
324if (!Directory.Exists(outputDirectory)) 330if (!outputDirectory.EndsWith("\"", StringComparison.Ordinal) || !Directory.Exists(outputDirectory = outputDirectory.Remove(outputDirectory.Length - 1))) 345if (Directory.Exists(codePath))
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
552if (!string.IsNullOrEmpty(destinationDirectory) && !Directory.Exists(destinationDirectory))
dotnet-svcutil-lib (15)
CommandProcessorOptions.cs (1)
1029if (!Directory.Exists(this.BootstrapPath.FullName))
FrameworkFork\Microsoft.CodeDom\Compiler\RedistVersionInfo.cs (2)
53if (Directory.Exists(dir)) 60if (dir != null && Directory.Exists(dir))
Metadata\MetadataDocumentSaver.cs (1)
315if (!Directory.Exists(dirPath))
Metadata\MetadataFileNameManager.cs (1)
189if (Directory.Exists(dirPath))
OutputPathHelper.cs (1)
72if (!Directory.Exists(directoryPath))
Shared\MSBuildProj.cs (7)
336if (System.IO.Directory.Exists(fullPath)) // IsDir? 340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath))) 355if (!Directory.Exists(msbuildProj.DirectoryPath)) 402if (!Directory.Exists(projectDir)) 700if (!Directory.Exists(this.DirectoryPath)) 1007if (Directory.Exists(binFolder)) 1057if (_ownsDirectory && Directory.Exists(this.DirectoryPath) && !DebugUtils.KeepTemporaryDirs)
Shared\ProjectPropertyResolver.cs (1)
178if (Directory.Exists(sdkPath))
Shared\Utilities\PathHelper.cs (1)
249if (!string.IsNullOrEmpty(itemName) && !string.IsNullOrEmpty(workingDir) && Directory.Exists(workingDir))
dotnet-svcutil-lib.Tests (19)
E2ETests.cs (3)
25if (!Directory.Exists(this_TestGroupOutputDir)) 42Assert.True(Directory.Exists(this_TestGroupOutputDir), $"{nameof(this_TestGroupOutputDir)} is not initialized!"); 43Assert.True(Directory.Exists(this_TestGroupBaselinesDir), $"{nameof(this_TestGroupBaselinesDir)} is not initialized!");
FileUtil.cs (2)
18if (overwrite && Directory.Exists(destinationDirectory)) 43if (Directory.Exists(directoryPath))
MSBuildProjTests.cs (1)
20if (!Directory.Exists(_testDir))
TestInit.cs (12)
155Assert.True(Directory.Exists(g_RepositoryRoot), $"{nameof(g_RepositoryRoot)} is not initialized!"); 156Assert.True(Directory.Exists(g_TestCasesDir), $"{nameof(g_TestCasesDir)} is not initialized!"); 157Assert.True(Directory.Exists(g_TestResultsDir), $"{nameof(g_TestResultsDir)} is not initialized!"); 158Assert.True(Directory.Exists(g_TestBootstrapDir), $"{nameof(g_TestBootstrapDir)} is not initialized!"); 159Assert.True(Directory.Exists(g_TestOutputDir), $"{nameof(g_TestOutputDir)} is not initialized!"); 160Assert.True(Directory.Exists(g_BaselinesDir), $"{nameof(g_BaselinesDir)} is not initialized!"); 180if (!Directory.Exists(pkgPath) || !Directory.GetFiles(pkgPath, "dotnet-svcutil-lib*.nupkg").Any()) 277Assert.True(Directory.Exists(this_TestCaseOutputDir), $"{nameof(this_TestGroupOutputDir)} is not initialized!"); 278Assert.True(Directory.Exists(this_TestCaseBaselinesDir), $"{nameof(this_TestCaseBaselinesDir)} is not initialized!"); 537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases"))) 540Assert.True(Directory.Exists(vstestDir), $"{nameof(vstestDir)} is not initialized!"); 556if (!Directory.Exists(binDir) || !Directory.GetFiles(binDir, "dotnet-svcutil-lib.*.nupkg").Any())
UnitTest.cs (1)
219if (!Directory.Exists(wsdlFilesDstDir))
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (1)
106if (!Directory.Exists(directoryPath))
dotnet-user-jwts (1)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
28if (Directory.Exists(projectPath))
dotnet-user-secrets (1)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
28if (Directory.Exists(projectPath))
dotnet-watch (1)
Program.cs (1)
199if (Directory.Exists(projectPath))
GenerateAnalyzerNuspec (7)
Program.cs (7)
153if (Directory.Exists(assemblyFolder)) 228if (rulesetsDir.Length > 0 && Directory.Exists(rulesetsDir)) 239if (editorconfigsDir.Length > 0 && Directory.Exists(editorconfigsDir)) 251if (globalAnalyzerConfigsDir.Length > 0 && Directory.Exists(globalAnalyzerConfigsDir)) 266if (analyzerDocumentationFileDir.Length > 0 && Directory.Exists(analyzerDocumentationFileDir) && analyzerDocumentationFileName.Length > 0) 275if (analyzerSarifFileDir.Length > 0 && Directory.Exists(analyzerSarifFileDir) && analyzerSarifFileName.Length > 0) 284if (analyzerConfigurationFileDir.Length > 0 && Directory.Exists(analyzerConfigurationFileDir) && analyzerConfigurationFileName.Length > 0)
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
33if (Directory.Exists(editorconfigFilePath))
ilc (1)
parent\parent\Common\CommandLineHelpers.cs (1)
378if (Directory.Exists(directoryName))
illink (2)
Infrastructure.Tests (11)
ExtractTestPartitions\MockAssemblyBuilder.cs (1)
265if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir))
PowerShellScripts\PowerShellCommand.cs (1)
244if (!Directory.Exists(WorkingDirectory))
Shared\TestDataBuilder.cs (5)
58if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir)) 104if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir)) 129if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir)) 148if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir)) 170if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir))
Shared\TestTrxBuilder.cs (1)
79if (Directory.Exists(tempDirectory))
tests\Shared\TemporaryWorkspace.cs (1)
194if (!deleteDirectory || !Directory.Exists(workspacePath))
TestTriggerMap\SelectTestsAcceptanceTests.cs (1)
1075if (File.Exists(baseline) && Directory.Exists(Path.Combine(polyglotRoot, name)))
WorkflowScripts\NodeCommand.cs (1)
223if (!Directory.Exists(WorkingDirectory))
Microsoft.Agents.AI.ProjectTemplates.Tests (3)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
73if (Directory.Exists(testSandbox))
test\ProjectTemplates\Infrastructure\TemplateSnapshotTestBase.cs (1)
29if (Directory.Exists(workingDir))
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (1)
47if (Directory.Exists(gitPath) || File.Exists(gitPath))
Microsoft.Arcade.Common (1)
FileSystem.cs (1)
15public bool DirectoryExists(string path) => Directory.Exists(path);
Microsoft.AspNetCore.Components.Testing (1)
Infrastructure\TracingSession.cs (1)
141else if (Directory.Exists(_artifactDir))
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
255 if (Directory.Exists(contentRootDir))
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
342 if (Directory.Exists(contentRootDir))
Microsoft.AspNetCore.DeveloperCertificates.XPlat (9)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
444if (!string.IsNullOrEmpty(exportDir) && !Directory.Exists(exportDir))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation)) 427if (!Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
849if (!Directory.Exists(nssDb)) 877if (!Directory.Exists(homeDirectory)) 885if (Directory.Exists(chromiumNssDb)) 893if (Directory.Exists(chromiumSnapNssDb)) 899if (Directory.Exists(firefoxDir)) 909if (Directory.Exists(firefoxSnapDir))
Microsoft.AspNetCore.Hosting (6)
Internal\HostingEnvironmentExtensions.cs (6)
17if (!Directory.Exists(contentRootPath)) 31if (Directory.Exists(wwwroot)) 44if (!Directory.Exists(hostingEnvironment.WebRootPath)) 68if (!Directory.Exists(contentRootPath)) 82if (Directory.Exists(wwwroot)) 95if (!Directory.Exists(hostingEnvironment.WebRootPath))
Microsoft.AspNetCore.Http (1)
parent\parent\WebUtilities\src\AspNetCoreTempDirectory.cs (1)
22if (!Directory.Exists(temp))
Microsoft.AspNetCore.HttpLogging (1)
FileLoggerProcessor.cs (1)
243if (!Directory.Exists(_path))
Microsoft.AspNetCore.InternalTesting (2)
AssemblyTestLog.cs (2)
275if (!Directory.Exists(dir)) 310Directory.Exists(_baseDirectory))
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Common\DeploymentParameters.cs (1)
57if (!Directory.Exists(applicationPath))
Common\DotNetCommands.cs (1)
64if (OperatingSystem.IsWindows() && Directory.Exists(archSpecificDir))
Deployers\ApplicationDeployer.cs (1)
46if (!Directory.Exists(DeploymentParameters.ApplicationPath))
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
281if (!Directory.Exists(destDirName))
Deployers\SelfHostDeployer.cs (1)
135Logger.LogInformation($"{Directory.Exists(workingDirectory)}");
Microsoft.AspNetCore.Server.Kestrel.Core (10)
Internal\CertificatePathWatcher.cs (1)
34dir => Directory.Exists(dir)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
444if (!string.IsNullOrEmpty(exportDir) && !Directory.Exists(exportDir))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation)) 427if (!Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
849if (!Directory.Exists(nssDb)) 877if (!Directory.Exists(homeDirectory)) 885if (Directory.Exists(chromiumNssDb)) 893if (Directory.Exists(chromiumSnapNssDb)) 899if (Directory.Exists(firefoxDir)) 909if (Directory.Exists(firefoxSnapDir))
Microsoft.AspNetCore.SpaServices.Extensions (1)
StaticFiles\DefaultSpaStaticFileProvider.cs (1)
39if (Directory.Exists(absoluteRootPath))
Microsoft.AspNetCore.WebUtilities (1)
AspNetCoreTempDirectory.cs (1)
22if (!Directory.Exists(temp))
Microsoft.Build.Framework (4)
FileClassifier.cs (1)
303if (!Directory.Exists(path))
FileSystem\ManagedFileSystem.cs (1)
139return Directory.Exists(path);
FileUtilities_TempFiles.cs (1)
49if (Directory.Exists(pathToCleanup))
NativeMethods.cs (1)
716if (Directory.Exists(fullPath))
Microsoft.Build.NuGetSdkResolver (1)
NuGetSdkResolver.cs (1)
308if (!NuGet.Common.RuntimeEnvironmentHelper.IsWindows && !Directory.Exists(installedPath))
Microsoft.Build.Tasks.CodeAnalysis (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
178if (Directory.Exists(loggingFilePath))
Microsoft.Build.Tasks.Core (1)
BootstrapperUtil\Util.cs (1)
226if (Directory.Exists(msbuildExtensionPackagesPath))
Microsoft.Build.Tasks.Git (6)
GitDataReader\GitConfig.Reader.cs (1)
181if (Directory.Exists(mingwEtc))
GitDataReader\GitIgnore.Matcher.cs (1)
101var isDirectoryPath = PathUtils.HasTrailingDirectorySeparator(fullPath) || Directory.Exists(fullPath);
GitDataReader\GitRepository.cs (4)
185Directory.Exists(dotGitPath) ? dotGitPath : 393if (Directory.Exists(dotGitPath)) 414if (Directory.Exists(directory)) 490return Directory.Exists(commonDirectory);
Microsoft.CodeAnalysis (5)
CommandLine\CommonCompiler.cs (1)
1194if (Directory.Exists(explicitGeneratedOutDir))
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
136if (Directory.Exists(legacyShadowDirectory)) 167if (!Directory.Exists(shadowDirectory)) 205if (Directory.Exists(subDirectory)) 246if (!Directory.Exists(cacheDirectory))
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
33if (Directory.Exists(editorconfigFilePath))
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
33if (Directory.Exists(editorconfigFilePath))
Microsoft.CodeAnalysis.BuildClient.Package (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
178if (Directory.Exists(loggingFilePath))
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCommandLineParser.cs (1)
1648else if (!Directory.Exists(resolvedPath))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (1)
1071if (Directory.Exists(resolvedProjectPath))
Microsoft.CodeAnalysis.Features (4)
Completion\FileSystemCompletionHelper.cs (1)
62return Directory.Exists(fullPath);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
166while (!IOUtilities.PerformIO(() => Directory.Exists(directoryToCreate)))
MetadataAsSource\MetadataAsSourceFileService.cs (1)
123if (Directory.Exists(rootDirectory))
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
235while (!Directory.Exists(tempFilePath))
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
32if (Directory.Exists(editorconfigFilePath))
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\DefaultRazorProjectFileSystem.cs (1)
45if (!Directory.Exists(absoluteBasePath))
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
33if (Directory.Exists(editorconfigFilePath))
Microsoft.CodeAnalysis.Scripting (3)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (3)
188if (Directory.Exists(directory)) 433if (!Directory.Exists(ShadowCopyDirectory)) 513if (File.Exists(dir) || Directory.Exists(dir))
Microsoft.CodeAnalysis.Workspaces (5)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (4)
136if (Directory.Exists(legacyShadowDirectory)) 167if (!Directory.Exists(shadowDirectory)) 205if (Directory.Exists(subDirectory)) 246if (!Directory.Exists(cacheDirectory))
Workspace\Host\PersistentStorage\AbstractPersistentStorage.cs (1)
34if (!Directory.Exists(this.DatabaseDirectory))
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.cs (1)
137if (Directory.Exists(solutionDirectory))
MSBuild\MSBuildWorkspace.cs (1)
521if (!Directory.Exists(dir))
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
MonoMSBuildDiscovery.cs (2)
99if (Directory.Exists(DefaultMonoLibPath)) 120s_monoLibDirPath = Directory.Exists(monoLibDirPath)
Microsoft.Deployment.DotNet.Releases (1)
Utils.cs (1)
51if (!Directory.Exists(directory))
Microsoft.DotNet.ApiCompat.Task (1)
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\ValidateAssemblies.cs (1)
125if (Directory.Exists(path))
Microsoft.DotNet.ApiSymbolExtensions (3)
AssemblySymbolLoader.cs (3)
132if (Directory.Exists(path)) 305if (!Directory.Exists(directory)) 351if (Directory.Exists(path))
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (1)
309if (Directory.Exists(runtimeDirectory))
src\LocateDotNet.cs (1)
78if (dotNetDir == null || !Directory.Exists(TaskEnvironment.GetAbsolutePath(Path.Combine(dotNetDir, "sdk", sdkVersion))))
Microsoft.DotNet.Build.Tasks.Installers (7)
src\CreateWixBuildWixpack.cs (3)
112if (Directory.Exists(wixpackWorkingDir)) 165if (!Directory.Exists(outputFolder)) 185if (!Directory.Exists(fullSourceDirPath))
src\CreateWixCommandPackageDropBase.cs (4)
61if (!Directory.Exists(packageDropDir)) 81if(!Directory.Exists(outputFolderPath)) 134if(!Directory.Exists(packageDropDir)) 335if (!Directory.Exists(newFolder))
Microsoft.DotNet.Build.Tasks.Packaging (8)
GenerateNuSpec.cs (1)
120if (!String.IsNullOrEmpty(directory) && !Directory.Exists(directory))
GenerateRuntimeDependencies.cs (1)
140if (!String.IsNullOrEmpty(destRuntimeFileDir) && !Directory.Exists(destRuntimeFileDir))
HarvestPackage.cs (2)
474if (Directory.Exists(candidateFolder)) 482if (Directory.Exists(candidateFolder))
NuGetPack.cs (2)
163if (!Directory.Exists(OutputDirectory)) 312if (!Directory.Exists(directory))
PackageIndex.cs (1)
79if (!String.IsNullOrEmpty(directory) && !Directory.Exists(directory))
PackageReport.cs (1)
35if (!Directory.Exists(directory))
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
OptProf\GenerateTrainingInputFiles.cs (1)
73if (!Directory.Exists(insertionDirectory))
Microsoft.DotNet.Build.Tasks.Workloads (1)
Utils.cs (1)
193if (Directory.Exists(path))
Microsoft.DotNet.Cli.Definitions (1)
Common\TargetPlatformOptions.cs (1)
117string runtimeIdentifierChainPath = string.IsNullOrEmpty(Product.Version) || !Directory.Exists(Path.Combine(sdkPath, Product.Version)) ?
Microsoft.DotNet.Cli.Utils (2)
PathUtility.cs (2)
60if (directoryPath is not null && !Directory.Exists(directoryPath)) 348if (!File.Exists(p) && (!allowDirectories || !Directory.Exists(p)))
Microsoft.DotNet.CMake.Sdk (1)
src\GetCMakeArtifactsFromFileApi.cs (1)
54if (!Directory.Exists(replyDirPath))
Microsoft.DotNet.HotReload.Watch (4)
FileWatcher\EventBasedDirectoryWatcher.cs (4)
63if (Directory.Exists(e.FullPath)) 87var isDir = Directory.Exists(e.FullPath); 107var isDir = Directory.Exists(e.FullPath); 127var isDir = Directory.Exists(e.FullPath);
Microsoft.DotNet.InternalAbstractions (2)
DirectoryPath.cs (1)
86if (!Directory.Exists(destPath))
DirectoryWrapper.cs (1)
12return Directory.Exists(path);
Microsoft.DotNet.MacOsPkg.Core (4)
AppBundle.cs (2)
23if (Directory.Exists(path)) 28bool containsAppBundleContents = Directory.Exists(Path.Combine(path, "Contents")) &&
MacOsPkgCore.cs (1)
57if (!Directory.Exists(srcPath))
Utilities.cs (1)
25if (Directory.Exists(path))
Microsoft.DotNet.NativeWrapper (1)
HostFxrLocator.cs (1)
46directoryExists: Directory.Exists,
Microsoft.DotNet.PackageTesting (2)
VerifyClosure.cs (1)
84if (Directory.Exists(path))
VerifyTypes.cs (1)
86if (Directory.Exists(path))
Microsoft.DotNet.ProjectTools (1)
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (1)
1071if (Directory.Exists(resolvedProjectPath))
Microsoft.DotNet.SharedFramework.Sdk (2)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
84if (Directory.Exists(path))
parent\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (1)
86if (Directory.Exists(path))
Microsoft.DotNet.SourceBuild.Tasks (1)
src\WriteBuildOutputProps.cs (1)
77.Where(dir => Directory.Exists(dir))
Microsoft.DotNet.TemplateLocator (10)
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (6)
94if (userManifestsRoot != null && WorkloadFileBasedInstall.IsUserLocal(_sdkRootPath, _sdkVersionBand.ToString()) && Directory.Exists(userManifestsRoot)) 373if (Directory.Exists(manifestVersionBandDirectory)) 388if (Directory.Exists(manifestVersionBandDirectory)) 520if (!Directory.Exists(sdkManifestPath)) 534.Where(t => Directory.Exists(t.manifestDirectory)) 635if (Directory.Exists(workloadSetsRoot))
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\TempDirectoryWorkloadManifestProvider.cs (1)
46if (Directory.Exists(_manifestsPath))
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (1)
51if (Directory.Exists(localizationDir))
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (2)
36if (userProfileDir != null && WorkloadFileBasedInstall.IsUserLocal(dotnetRootPath, sdkVersion) && Directory.Exists(userProfileDir)) 356_directoryExistOverride?.Invoke(packPath) ?? Directory.Exists(packPath); ;
Microsoft.DotNet.VersionTools.Cli (1)
FileSystemProxy.cs (1)
12return Directory.Exists(path);
Microsoft.Extensions.AI.Abstractions (2)
Contents\DataContent.cs (1)
219if (path.Length == 0 || Directory.Exists(path))
Files\HostedFileClientExtensions.cs (1)
108if (destinationPath.Length == 0 || Directory.Exists(destinationPath))
Microsoft.Extensions.AI.Abstractions.Tests (7)
Contents\DataContentTests.cs (7)
531if (Directory.Exists(tempDir)) 560if (Directory.Exists(tempDir)) 645if (Directory.Exists(relativeDir)) 728if (Directory.Exists(tempDir)) 758if (Directory.Exists(tempDir)) 855if (Directory.Exists(tempDir)) 884if (Directory.Exists(tempDir))
Microsoft.Extensions.AI.Evaluation.Console (1)
Commands\ReportCommand.cs (1)
121if (outputPath is not null && !Directory.Exists(outputPath))
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIHostedFileClientIntegrationTests.cs (1)
257if (tempDir is not null && Directory.Exists(tempDir))
Microsoft.Extensions.AI.Templates.Tests (3)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
73if (Directory.Exists(testSandbox))
test\ProjectTemplates\Infrastructure\TemplateSnapshotTestBase.cs (1)
29if (Directory.Exists(workingDir))
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (1)
47if (Directory.Exists(gitPath) || File.Exists(gitPath))
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationBuilderExtensions.cs (1)
50if (!optional || Directory.Exists(directoryPath))
Microsoft.Extensions.Configuration.UserSecrets (1)
UserSecretsConfigurationExtensions.cs (1)
183PhysicalFileProvider? fileProvider = Directory.Exists(directoryPath)
Microsoft.Extensions.DependencyModel (1)
DirectoryWrapper.cs (1)
13return Directory.Exists(path);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Linux\Resources\TestResources.cs (1)
50if (!Directory.Exists(directoryName))
Microsoft.Extensions.FileProviders.Physical (11)
PhysicalFileProvider.cs (1)
319if (fullPath == null || !Directory.Exists(fullPath))
PhysicalFilesWatcher.cs (10)
347if (Directory.Exists(e.FullPath)) 572if ((!_filePathTokenLookup.IsEmpty || !_wildcardTokenLookup.IsEmpty) && Directory.Exists(_root)) 671if (!Directory.Exists(_root)) 697if (!Directory.Exists(_root)) 709else if (!Directory.Exists(_root)) 776if (Directory.Exists(_root)) 937while (!Directory.Exists(current)) 987while (Path.Combine(watchDir, _expectedName) is var childPath && Directory.Exists(childPath)) 1025if (!Directory.Exists(nextDir)) 1071if (!Directory.Exists(e.FullPath))
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Program.cs (1)
55string[] files = Directory.Exists(inputFiles)
Microsoft.Maui (1)
Fonts\FileSystemEmbeddedFontLoader.cs (1)
65 if (!Directory.Exists(rootPath))
Microsoft.Maui.Resizetizer (1)
TizenSplashUpdater.cs (1)
32 if (Directory.Exists(splashFullPath))
Microsoft.ML.AutoML (1)
API\AutoMLExperimentExtension.cs (1)
307if (!Directory.Exists(folder))
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
177if (!Directory.Exists(outPutBaseDir))
Microsoft.ML.Core (6)
ComponentModel\AssemblyLoadingUtils.cs (1)
190if (!Directory.Exists(dir))
Data\Repository.cs (1)
129while (path is null || Directory.Exists(path))
Utilities\PathUtils.cs (1)
131if (Directory.Exists(folder))
Utilities\ResourceManagerUtils.cs (2)
211if (!Directory.Exists(appDataBaseDir) && string.IsNullOrEmpty(envDir)) 231if (!Directory.Exists(absDir))
Utilities\Stream.cs (1)
865if (!Directory.Exists(dir))
Microsoft.ML.ImageAnalytics (1)
ImageLoader.cs (1)
111if (Directory.Exists(imageFolder))
Microsoft.ML.SamplesUtils (3)
SamplesDatasetUtils.cs (3)
27while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null) 176if (!Directory.Exists(path)) 180if (!Directory.Exists(varPath))
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
138if (!Directory.Exists(folderName))
Microsoft.ML.TensorFlow (2)
TensorflowUtils.cs (2)
291if (Directory.Exists(folder)) 404env.CheckUserArg(Directory.Exists(modelPath), nameof(modelPath));
Microsoft.ML.TensorFlow.Tests (4)
TensorflowTests.cs (4)
38if (Directory.Exists(parentWorkspacePath)) 751if (Directory.Exists(varDir)) 1433if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName)) 1944if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias)))
Microsoft.ML.TestFramework (1)
BaseTestBaseline.cs (1)
95Contracts.Check(Directory.Exists(baselineRootDir));
Microsoft.ML.TestFrameworkCommon (1)
TestCommon.cs (1)
76while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null)
Microsoft.ML.Tests (1)
DatabaseLoaderTests.cs (1)
76if (_temporaryDatabaseDirectory != null && Directory.Exists(_temporaryDatabaseDirectory))
Microsoft.ML.Vision (3)
ImageClassificationTrainer.cs (3)
545if (!Directory.Exists(_resourcePath)) 659if (!Directory.Exists(_options.WorkspacePath)) 1134if (_cleanupWorkspace && Directory.Exists(_options.WorkspacePath))
Microsoft.NET.Build.Containers (2)
LocalDaemons\ArchiveFileRegistry.cs (1)
42if (parentDirectory != null && !Directory.Exists(parentDirectory))
Tasks\CreateNewImage.cs (1)
63if (!Directory.Exists(PublishDirectory))
Microsoft.NET.Build.Tasks (19)
FrameworkPackages\FrameworkPackages.cs (1)
131if (Directory.Exists(packsFolder))
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (6)
94if (userManifestsRoot != null && WorkloadFileBasedInstall.IsUserLocal(_sdkRootPath, _sdkVersionBand.ToString()) && Directory.Exists(userManifestsRoot)) 373if (Directory.Exists(manifestVersionBandDirectory)) 388if (Directory.Exists(manifestVersionBandDirectory)) 520if (!Directory.Exists(sdkManifestPath)) 534.Where(t => Directory.Exists(t.manifestDirectory)) 635if (Directory.Exists(workloadSetsRoot))
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\TempDirectoryWorkloadManifestProvider.cs (1)
46if (Directory.Exists(_manifestsPath))
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (1)
51if (Directory.Exists(localizationDir))
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (2)
36if (userProfileDir != null && WorkloadFileBasedInstall.IsUserLocal(dotnetRootPath, sdkVersion) && Directory.Exists(userProfileDir)) 356_directoryExistOverride?.Invoke(packPath) ?? Directory.Exists(packPath); ;
ProcessFrameworkReferences.cs (1)
1171if (Directory.Exists(absolutePackPath))
ResolveAppHosts.cs (1)
302if (appHostPackPathAbsolute != null && Directory.Exists(appHostPackPathAbsolute))
ResolveRuntimePackAssets.cs (1)
123if (absoluteRuntimePackRoot == default || !Directory.Exists(absoluteRuntimePackRoot))
ResolveTargetingPackAssets.cs (2)
155if (string.IsNullOrEmpty(targetingPackRoot.Value) || !Directory.Exists(targetingPackRoot)) 215if (!Directory.Exists(targetingPackDllFolder) &&
RunCsWinRTGenerator.cs (3)
136if (InteropAssemblyDirectory is null || !Directory.Exists(InteropAssemblyDirectory)) 143if (DebugReproDirectory is not null && !Directory.Exists(DebugReproDirectory)) 150if (CsWinRTToolsDirectory is null || !Directory.Exists(CsWinRTToolsDirectory))
Microsoft.NET.HostModel (3)
AppHost\BinaryUtils.cs (1)
168if (!Directory.Exists(destinationDirectory))
Bundle\Bundler.cs (1)
322if (!Directory.Exists(destinationDirectory))
ComHost\ComHost.cs (1)
31if (!Directory.Exists(destinationDirectory))
Microsoft.NET.ProjectData (12)
CacheFileReader.cs (1)
874 if (!Directory.Exists(analyzerDir)) continue;
CachePathResolver.cs (7)
244 if (Directory.Exists(objDir)) 489 if (Directory.Exists(candidate)) 532 if (!Directory.Exists(packDir)) continue; 1128 if (Directory.Exists(direct)) 1134 if (Directory.Exists(lower)) 1279 .Where(Directory.Exists) 1326 if (Directory.Exists(candidate))
Donor\ProjectDataDonorIndex.cs (1)
199 if (Directory.Exists(gitPath))
Donor\ProjectDataDonorIndex.Git.cs (2)
47 if (Directory.Exists(gitPath)) 105 if (!Directory.Exists(workingDirectory))
Donor\ProjectDataDonorIndex.Selection.cs (1)
81 Directory.Exists(entry.Path) &&
Microsoft.NET.ProjectData.Tasks (5)
CachePathResolver.cs (2)
307 if (string.IsNullOrEmpty(candidate) || !Directory.Exists(candidate)) return; 355 return Directory.Exists(candidate) ? NormalizeFolderPath(candidate) : null;
ProjectDataMerger.cs (1)
158 if (!Directory.Exists(baseDir)) return [];
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\Donor\ProjectDataDonorIndex.cs (1)
199 if (Directory.Exists(gitPath))
ValidateProjectDataPackagesTask.cs (1)
278 else if (!Directory.Exists(packagePath))
Microsoft.NET.Sdk.Publish.Tasks (5)
Kudu\KuduVfsDeploy.cs (1)
34if (sourcePath is null || !Directory.Exists(sourcePath))
MsDeploy\CommonUtility.cs (1)
1367if (!string.IsNullOrEmpty(dirPath) && Directory.Exists(dirPath))
Tasks\MsDeploy\CreateParameterFile.cs (1)
160&& (Directory.Exists(metadataValue)
Tasks\TransformAppSettings.cs (1)
95if (!Directory.Exists(PublishDirectory))
WebConfigTelemetry.cs (1)
64if (string.IsNullOrEmpty(solutionDirectory) || !Directory.Exists(solutionDirectory))
Microsoft.NET.Sdk.Razor.Tasks (3)
parent\Tool\ServerProtocol\ServerLogger.cs (1)
46if (Directory.Exists(loggingFileName))
SdkRazorGenerate.cs (1)
62if (!Directory.Exists(ProjectRoot))
SdkRazorTagHelper.cs (1)
53if (!Directory.Exists(ProjectRoot))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (1)
OverrideHtmlAssetPlaceholders.cs (1)
57if (!Directory.Exists(OutputPath))
Microsoft.NET.Sdk.WorkloadManifestReader (10)
SdkDirectoryWorkloadManifestProvider.cs (6)
94if (userManifestsRoot != null && WorkloadFileBasedInstall.IsUserLocal(_sdkRootPath, _sdkVersionBand.ToString()) && Directory.Exists(userManifestsRoot)) 373if (Directory.Exists(manifestVersionBandDirectory)) 388if (Directory.Exists(manifestVersionBandDirectory)) 520if (!Directory.Exists(sdkManifestPath)) 534.Where(t => Directory.Exists(t.manifestDirectory)) 635if (Directory.Exists(workloadSetsRoot))
TempDirectoryWorkloadManifestProvider.cs (1)
46if (Directory.Exists(_manifestsPath))
WorkloadManifestReader.Localization.cs (1)
51if (Directory.Exists(localizationDir))
WorkloadResolver.cs (2)
36if (userProfileDir != null && WorkloadFileBasedInstall.IsUserLocal(dotnetRootPath, sdkVersion) && Directory.Exists(userProfileDir)) 356_directoryExistOverride?.Invoke(packPath) ?? Directory.Exists(packPath); ;
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (5)
CachingWorkloadResolver.cs (1)
214if (Directory.Exists(packInfo.Path))
parent\parent\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (4)
17if (Directory.Exists(_workloadMetadataDir)) 21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any()) 33if (Directory.Exists(path)) 50if (pathDir != null && !Directory.Exists(pathDir))
Microsoft.TemplateEngine.Abstractions (1)
PhysicalFileSystem\IPhysicalFileSystem.cs (1)
14/// Same behavior as <see cref="Directory.Exists(string)"/>.
Microsoft.TemplateEngine.Cli (1)
TemplatePackageCoordinator.cs (1)
212bool isPath = File.Exists(installArg) || Directory.Exists(installArg);
Microsoft.TemplateEngine.Utils (1)
PhysicalFileSystem.cs (1)
16return Directory.Exists(directory);
Microsoft.TestPlatform.CoreUtilities (2)
Helpers\FileHelper.cs (2)
35=> Directory.Exists(path); 94if (Directory.Exists(dirPath)
Microsoft.TestPlatform.CrossPlatEngine (3)
Discovery\DiscovererEnumerator.cs (1)
376IEnumerable<string> allDirectoryBasedSources = sources.Where(Directory.Exists).ToList();
Discovery\DiscoveryManager.cs (1)
259if (!File.Exists(src) && !Directory.Exists(src))
PostProcessing\ArtifactProcessingManager.cs (1)
261if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Directory.Exists(path))
Microsoft.TestPlatform.PlatformAbstractions (2)
common\Tracing\PlatformEqtTrace.cs (2)
351if (!Directory.Exists(LogFile)) 365if (!Directory.Exists(runnerLogFileInfo.DirectoryName))
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\Devices\Network.DownloadFile.vb (2)
335If IO.Directory.Exists(fullFilename) Then 359If Not IO.Directory.Exists(targetDirectory) Then
Microsoft\VisualBasic\Helpers\FileSystemUtils.vb (1)
40ElseIf IO.Directory.Exists(fullPath) Then
Microsoft\VisualBasic\Logging\FileLogTraceListener.vb (1)
290If Not Directory.Exists(tempPath) Then
Microsoft\VisualBasic\MyServices\Internal\WebClientCopy.vb (1)
159AndAlso IO.Directory.Exists(path), $"Invalid {NameOf(path)}")
Microsoft.VisualStudio.TestPlatform.Common (2)
DataCollection\DataCollectionAttachmentManager.cs (2)
121if (!Directory.Exists(SessionOutputDirectory)) 212if (!Directory.Exists(directoryName))
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (5)
TrxLogger.cs (1)
598if (!Directory.Exists(trxFileDirPath))
Utility\Converter.cs (2)
451if (!Directory.Exists(targetDirectory)) 507if (!Directory.Exists(testResultDirectory))
Utility\TrxFileHelper.cs (2)
391if (File.Exists(path) || Directory.Exists(path)) 397return !_checkMatchingDirectory || !Path.HasExtension(path) || !Directory.Exists(Path.ChangeExtension(path, string.Empty));
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
RunSettings\RunConfiguration.cs (1)
911|| !System.IO.Directory.Exists(solutionDirectory))
NuGet.CommandLine.XPlat (6)
Commands\ConfigCommands\ConfigRunners.cs (1)
158if (!Directory.Exists(directory))
Commands\Package\Update\PackageUpdateIO.cs (1)
48string settingsRoot = Directory.Exists(solutionDirectory) ? solutionDirectory : Path.GetDirectoryName(solutionDirectory)!;
Commands\Signing\SignCommand.cs (1)
212if (!Directory.Exists(outputDirectory))
Commands\Why\WhyCommand.cs (1)
82return File.Exists(value) || Directory.Exists(value);
Commands\Why\WhyCommandRunner.cs (1)
188if (Directory.Exists(fullPath)
Utility\MSBuildAPIUtility.cs (1)
135if (Directory.Exists(fullPath))
NuGet.Commands (4)
CommandRunners\PackCommandRunner.cs (1)
942if (files.Count() == 1 && Directory.Exists(files.First()))
MSBuildProjectFactory.cs (1)
104if (!Directory.Exists(manifestDirectory))
RestoreCommand\RestoreRunner.cs (2)
382if (File.Exists(input) || Directory.Exists(input)) 393Debug.Assert(File.Exists(input) || Directory.Exists(input));
NuGet.Common (8)
LocalResourceUtils.cs (1)
15if (!Directory.Exists(folderPath))
Migrations\Migration1.cs (3)
38if (Directory.Exists(v3cachePath)) 44if (Directory.Exists(pluginsCachePath)) 134if (Directory.Exists(directory))
PathUtil\PathUtility.cs (4)
179if (!Directory.Exists(directory)) 488if (Directory.Exists(parentDirectory)) 504return Directory.Exists(path.ToLowerInvariant()) && Directory.Exists(path.ToUpperInvariant());
NuGet.Configuration (1)
Utility\FileSystemUtility.cs (1)
74if (!Directory.Exists(path))
NuGet.PackageManagement (14)
NuGetPackageManager.cs (1)
2782if (Directory.Exists(packageFolderPath))
Utility\FileSystemUtility.cs (6)
177if (!Directory.Exists(path)) 287if (!Directory.Exists(dirPath)) 386return Directory.Exists(path); 419if (!Directory.Exists(fullPath)) 430for (var i = 0; Directory.Exists(fullPath) && i < 5; ++i) 447if (!Directory.Exists(path))
Utility\MSBuildNuGetProjectSystemUtility.cs (4)
246if (!Directory.Exists(Path.Combine(projectFullPath, directory))) 435if (!Directory.Exists(fullPath)) 461if (!Directory.Exists(fullPath)) 467for (var i = 0; Directory.Exists(fullPath) && i < 5; ++i)
Utility\PackagesConfigLockFileUtility.cs (1)
303if (!Directory.Exists(packagesFolderPath))
Utility\UriHelper.cs (2)
131if (Directory.Exists(currentSource)) 147if (Directory.Exists(currentSource))
NuGet.Packaging (10)
FallbackPackagePathResolver.cs (2)
45if (Directory.Exists(userPackageFolder)) 53if (!Directory.Exists(path))
PackageExtraction\PackagePathHelper.cs (2)
29if (!Directory.Exists(path)) 50if (!Directory.Exists(path))
PackageExtraction\StreamExtensions.cs (1)
82if (directory != null && !Directory.Exists(directory))
PackageExtractor.cs (4)
428if (Directory.Exists(targetPath)) 619if (Directory.Exists(targetPath)) 626Directory.Exists(parent.FullName) && 704if (Directory.Exists(targetPath))
PackagesConfigWriter.cs (1)
549if (!Directory.Exists(directorypath))
NuGet.ProjectModel (1)
ToolPathResolver.cs (1)
104if (!Directory.Exists(toolBasePath))
NuGet.Protocol (10)
LocalRepositories\LocalPackageSearchResource.cs (1)
191if (Directory.Exists(UriUtility.GetLocalPath(currentSource)))
LocalRepositories\LocalV3FindPackageByIdResource.cs (1)
89_rootExists = new Lazy<bool>(() => Directory.Exists(_source));
PackagesFolder\NuGetv3LocalRepository.cs (1)
174if (!Directory.Exists(packageIdRoot))
Plugins\PluginDiscoverer.cs (2)
213else if (Directory.Exists(path)) 262if (!Directory.Exists(directoryPath))
Plugins\PluginDiscoveryUtility.cs (1)
81var existingDirectories = directories.Where(Directory.Exists);
Resources\PackageUpdateResource.cs (2)
816if (!Directory.Exists(packageDirectory)) 878if (!Directory.Exists(root) ||
Utility\FeedTypeUtility.cs (1)
43if (!Directory.Exists(path))
Utility\OfflineFeedUtility.cs (1)
125if ((isDirectory && !Directory.Exists(path)) ||
Pipelines.AppHost (1)
AppHost.cs (1)
270if (!Directory.Exists(sourcePath))
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
185if (Directory.Exists(publishDir))
PresentationBuildTasks (5)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (1)
135if (!Directory.Exists(OutputPath))
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (1)
108if (!Directory.Exists(OutputPath))
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
163if (!Directory.Exists(OutputPath))
Microsoft\Build\Tasks\Windows\UidManager.cs (1)
384if (!Directory.Exists(_backupPath))
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
482if (targetPath.Length > 0 && !Directory.Exists(targetPath))
PresentationCore (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\IO\FileHelper.cs (1)
103if (!Directory.Exists(subFolderPath))
RepoTasks (12)
BatchHelixWorkItems.cs (3)
69Directory.Exists(payloadDirectory); 75if (Directory.Exists(payloadDirectory)) 103if (Directory.Exists(batchDirectory))
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
444if (!string.IsNullOrEmpty(exportDir) && !Directory.Exists(exportDir))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
376if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation)) 427if (!Directory.Exists(MacOSUserHttpsCertificateLocation))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
849if (!Directory.Exists(nssDb)) 877if (!Directory.Exists(homeDirectory)) 885if (Directory.Exists(chromiumNssDb)) 893if (Directory.Exists(chromiumSnapNssDb)) 899if (Directory.Exists(firefoxDir)) 909if (Directory.Exists(firefoxSnapDir))
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
33if (Directory.Exists(editorconfigFilePath))
rzc (1)
ServerProtocol\ServerLogger.cs (1)
46if (Directory.Exists(loggingFileName))
sdk-tasks (8)
CopyPreservingRelativeSymlinks.cs (1)
94if (!string.IsNullOrEmpty(destDir) && !Directory.Exists(destDir))
DeduplicateAssembliesWithLinks.cs (1)
35if (!Directory.Exists(LayoutDirectory))
ExtractArchiveToDirectory.cs (1)
46if (Directory.Exists(DestinationDirectory) && CleanDestination == true)
ReplaceFileContents.cs (1)
125if (!Directory.Exists(destinationDirectory))
ReplaceFilesWithSymbolicLinks.cs (2)
51if (!System.IO.Directory.Exists(Directory)) 57if (!System.IO.Directory.Exists(LinkToFilesFrom))
TarGzFileCreateFromDirectory.cs (1)
77if (!Directory.Exists(SourceDirectory))
ZipFileCreateFromDirectory.cs (1)
58if (!Directory.Exists(Path.GetDirectoryName(DestinationArchive)))
System.CommandLine (3)
ArgumentValidation.cs (2)
198else if (checkDirectory && !Directory.Exists(token.Value)) 202else if (checkFile && !Directory.Exists(token.Value) && !File.Exists(token.Value))
Binding\ArgumentConverter.StringConverters.cs (1)
121if (Directory.Exists(path))
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (1)
91if (Directory.Exists(path))
System.Configuration.ConfigurationManager (1)
System\Configuration\Internal\InternalConfigHost.cs (1)
243if (!Directory.Exists(dir))
System.Console (1)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System.Diagnostics.Process (2)
System\Diagnostics\Process.Linux.cs (1)
115if (Directory.Exists(path))
System\Diagnostics\ProcessUtils.Unix.cs (1)
341if (Directory.Exists(resolvedPath))
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.Linux.cs (1)
35if (!Directory.Exists(value))
System.Formats.Tar (13)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System\Formats\Tar\TarEntry.cs (3)
576Debug.Assert(Directory.Exists(Path.GetDirectoryName(filePath))); 577Debug.Assert(!Directory.Exists(filePath)); 652if (Directory.Exists(filePath))
System\Formats\Tar\TarFile.cs (8)
68if (!Directory.Exists(sourceDirectoryName)) 136if (!Directory.Exists(sourceDirectoryName)) 191if (!Directory.Exists(sourceDirectoryName)) 254if (!Directory.Exists(sourceDirectoryName)) 310if (!Directory.Exists(destinationDirectoryName)) 378if (!Directory.Exists(destinationDirectoryName)) 441if (!Directory.Exists(destinationDirectoryName)) 510if (!Directory.Exists(destinationDirectoryName))
System\Formats\Tar\TarHelpers.Unix.cs (1)
62if (Directory.Exists(fullPath))
System.IO.Compression.ZipFile (1)
System\IO\Compression\ZipFile.Create.cs (1)
509if (Directory.Exists(archiveFileName))
System.IO.FileSystem.DriveInfo (2)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System\IO\DriveInfo.cs (1)
26public bool IsReady => Directory.Exists(Name);
System.IO.FileSystem.Watcher (3)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System\IO\FileSystemWatcher.cs (2)
245if (!Directory.Exists(value)) 367if (!Directory.Exists(path))
System.IO.IsolatedStorage (4)
System\IO\IsolatedStorage\Helper.cs (1)
66if (!Directory.Exists(rootDirectory))
System\IO\IsolatedStorage\IsolatedStorageFile.cs (3)
44return !Directory.Exists(RootDirectory); 106return Directory.Exists(GetFullPath(path)); 123if (Directory.Exists(isPath))
System.IO.MemoryMappedFiles (1)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System.IO.Pipes (1)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System.IO.Ports (5)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
System\IO\Ports\SerialPort.Unix.cs (4)
38if (Directory.Exists(sysTtyDir)) 57Directory.Exists(entry.FullName + "/device/of_node"))) || 58(!isTtyS && Directory.Exists(entry.FullName + "/device/tty")) || 59Directory.Exists(sysUsbDir + entry.Name) ||
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (1)
278if (!string.IsNullOrEmpty(dirname) && !Directory.Exists(dirname))
System.Private.CoreLib (4)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
178return Directory.Exists(parentPath);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (1)
185if (!System.IO.Directory.Exists(directoryPath))
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (2)
103if (!Directory.Exists(Path.GetDirectoryName(destFullPath))) 250if (directoryName.Length > 0 && !Directory.Exists(directoryName))
System.Speech (1)
Internal\ResourceLoader.cs (1)
34if (Directory.Exists(file))
System.Windows.Forms (2)
System\Windows\Forms\Application.cs (1)
1342if (!Directory.Exists(path))
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
371if (parent is null || !string.IsNullOrEmpty(_initialDirectory) || !Directory.Exists(parent))
TypeScriptApiCompat (2)
ApiCompatSuppression.cs (1)
28if (!Directory.Exists(rootPath))
AtsSurface.cs (1)
39if (!Directory.Exists(rootPath))
vbc (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
178if (Directory.Exists(loggingFilePath))
VBCSCompiler (7)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (6)
243if (!Directory.Exists(dllCacheDir)) 313if (Directory.Exists(cacheDir)) 351if (Directory.Exists(stagingDir)) 477if (!Directory.Exists(cachePath)) 526if (Directory.Exists(dllDir) && !Directory.EnumerateFileSystemEntries(dllDir).Any()) 614if (!Directory.Exists(cachePath))
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
178if (Directory.Exists(loggingFilePath))