3 implementations of Exists
dotnet.Tests (1)
ConfigurerTests\GivenAFunctionReturnStringAndFakeFileSystem.cs (1)
94public bool Exists(string path)
Microsoft.DotNet.InternalAbstractions (1)
FileWrapper.cs (1)
8public bool Exists(string path)
Microsoft.NET.TestFramework (1)
Mock\FileSystemMockBuilder.cs (1)
343public bool Exists(string path)
73 references to Exists
dotnet (19)
BuildServer\RazorServer.cs (2)
27if (!_fileSystem.File.Exists(PidFile.ServerPath.Value)) 66if (_fileSystem.File.Exists(PidFile.Path.Value))
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (1)
89if (!_fileSystem.File.Exists(toolCommand.Executable.Value))
Commands\Tool\Restore\ToolPackageRestorer.cs (1)
129&& _fileSystem.File.Exists(toolCommand.Executable.Value);
ShellShim\LinuxEnvironmentPath.cs (1)
66if (_fileSystem.Exists(DotnetCliToolsProfilePath))
ShellShim\OsxBashEnvironmentPath.cs (1)
54if (_fileSystem.Exists(DotnetCliToolsPathsDPath))
ShellShim\ShellShimRepository.cs (3)
109foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.Exists(f.Value))) 124foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.Exists(f.Value))) 170return GetShimFiles(toolCommand).Any(p => _fileSystem.File.Exists(p.Value));
ToolManifest\ToolManifestFinder.cs (6)
72if (!_fileSystem.File.Exists(possibleManifest.Value)) 106if (!_fileSystem.File.Exists(possibleManifest.Value)) 138if (!_fileSystem.File.Exists(possibleManifest.Value)) 197if (_fileSystem.File.Exists(possibleManifest.Value)) 233|| _fileSystem.File.Exists(currentSearchDirectory.Value.WithFile(".git").Value)) 279if (_fileSystem.File.Exists(possibleManifest.Value))
ToolPackage\LocalToolsResolverCache.cs (2)
40if (_fileSystem.File.Exists(packageCacheFile)) 75if (_fileSystem.File.Exists(packageCacheFile))
ToolPackage\ToolPackageDownloaderBase.cs (1)
383if (_fileSystem.File.Exists(runtimeConfigFilePath))
ToolPackage\ToolPackageInstance.cs (1)
55bool usingRidSpecificPackage = _fileSystem.File.Exists(assetsJsonParentDirectory.WithFile(RidSpecificPackageAssetsFileName).Value);
dotnet.Tests (37)
BuildServerTests\RazorServerTests.cs (9)
37fileSystemMock.File.Exists(pidFilePath).Should().BeTrue(); 38fileSystemMock.File.Exists(serverPath).Should().BeTrue(); 56fileSystemMock.File.Exists(pidFilePath).Should().BeTrue(); 76fileSystemMock.File.Exists(pidFilePath).Should().BeTrue(); 77fileSystemMock.File.Exists(serverPath).Should().BeTrue(); 90fileSystemMock.File.Exists(pidFilePath).Should().BeFalse(); 109fileSystemMock.File.Exists(pidFilePath).Should().BeTrue(); 110fileSystemMock.File.Exists(serverPath).Should().BeFalse(); 127fileSystemMock.File.Exists(pidFilePath).Should().BeFalse();
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (2)
48_fileSystem.File.Exists(commandPath).Should().BeTrue("the following path exists: " + commandPath); 67_fileSystem.File.Exists(commandPath).Should().BeTrue("the following path exists: " + commandPath);
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (5)
149_fileSystem.File.Exists(ExpectedCommandPath()).Should().BeTrue(); 153_fileSystem.File.Exists(deserializedFakeShim.ExecutablePath).Should().BeTrue(); 173_fileSystem.File.Exists(ExpectedCommandPath()).Should().BeTrue(); 214_fileSystem.File.Exists(ExpectedCommandPath()) 219_fileSystem.File.Exists(deserializedFakeShim.ExecutablePath).Should().BeTrue();
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (8)
338_fileSystem.File.Exists(configManifestPath).Should().BeTrue("The .config manifest file should exist"); 344_fileSystem.File.Exists(_manifestFilePath).Should().BeFalse("No manifest should exist in the root folder"); 425_fileSystem.File.Exists(restoredCommand.Executable.Value); 450_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue(); 472_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue(); 497_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue(); 519_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue(); 570_fileSystem.File.Exists(restoredCommand.Executable.Value);
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (1)
146_fileSystem.File.Exists(restoredCommand.Executable.Value)
CommandTests\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommandTests.cs (6)
80_fileSystem.File.Exists(shimPath).Should().BeTrue(); 96_fileSystem.File.Exists(shimPath).Should().BeFalse(); 122_fileSystem.File.Exists(shimPath).Should().BeTrue(); 166_fileSystem.File.Exists(shimPath).Should().BeFalse(); 192_fileSystem.File.Exists(shimPath).Should().BeTrue(); 209_fileSystem.File.Exists(shimPath).Should().BeTrue();
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (1)
425_fileSystem.File.Exists(restoredCommand.Executable.Value).Should().BeTrue();
ConfigurerTests\GivenAFunctionReturnStringAndFakeFileSystem.cs (2)
56_fileSystemMock.File.Exists(path); 65_fileSystemMock.File.Exists(cacheFilePath);
ShellShimTests\LinuxEnvironmentPathTests.cs (1)
117.Exists(LinuxEnvironmentPath.DotnetCliToolsProfilePath)
ShellShimTests\OsxEnvironmentPathTests.cs (1)
117.Exists(OsxBashEnvironmentPath.DotnetCliToolsPathsDPath)
ToolManifestTests\ToolManifestFinderTests.cs (1)
779_fileSystem.File.Exists(Path.Combine(_testDirectoryRoot, "dotnet-tools.json")).Should().BeTrue();
Microsoft.DotNet.Cli.Utils.Tests (7)
MockFileSystemTests.cs (7)
35fileSystem.File.Exists($"{directory}/filename").Should().BeTrue(); 49fileSystem.File.Exists(nestedFilePath).Should().BeTrue(); 77fileSystem.File.Exists(Path.Combine(directory, "file")).Should().BeTrue(); 227fileSystem.File.Exists(sourceFile).Should().BeFalse(); 228fileSystem.File.Exists(destinationFile).Should().BeTrue(); 376fileSystem.File.Exists(file).Should().BeFalse(); 647fileSystem.File.Exists(Path.Combine(testDestinationDirectoryPath, nestedFilePath)).Should().BeTrue();
Microsoft.DotNet.Configurer (5)
AspNetCertificateSentinel.cs (1)
33return _fileSystem.File.Exists(SentinelPath);
FileSentinel.cs (1)
26return _fileSystem.File.Exists(_file.Value);
FirstTimeUseNoticeSentinel.cs (1)
33return _fileSystem.File.Exists(SentinelPath);
IFileExtensions.cs (1)
18if (!fileSystem.File.Exists(filePath))
UserLevelCacheWriter.cs (1)
33if (!_file.Exists(cacheFilepath))
Microsoft.DotNet.PackageInstall.Tests (4)
ToolPackageDownloaderTests.cs (3)
126fileSystem.File.Exists(assetJsonPath).Should().BeTrue(); 815fileSystem.File.Exists(package.Command.Executable.Value).Should().BeTrue($"{package.Command.Executable.Value} should exist"); 845fileSystem.File.Exists(package.Command.Executable.Value).Should()
ToolPackageInstallerNugetCacheTests.cs (1)
55.Exists(command.Executable.Value)
Microsoft.DotNet.Tools.Tests.ComponentMocks (1)
ToolPackageDownloaderMock.cs (1)
280_fileSystem.File.Exists(possibleNugetConfig.Value));