3 implementations of Exists
dotnet.Tests (1)
ConfigurerTests\GivenAFunctionReturnStringAndFakeFileSystem.cs (1)
94
public bool
Exists
(string path)
Microsoft.DotNet.InternalAbstractions (1)
FileWrapper.cs (1)
8
public bool
Exists
(string path)
Microsoft.NET.TestFramework (1)
Mock\FileSystemMockBuilder.cs (1)
343
public bool
Exists
(string path)
73 references to Exists
dotnet (19)
BuildServer\RazorServer.cs (2)
27
if (!_fileSystem.File.
Exists
(PidFile.ServerPath.Value))
66
if (_fileSystem.File.
Exists
(PidFile.Path.Value))
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (1)
89
if (!_fileSystem.File.
Exists
(toolCommand.Executable.Value))
Commands\Tool\Restore\ToolPackageRestorer.cs (1)
129
&& _fileSystem.File.
Exists
(toolCommand.Executable.Value);
ShellShim\LinuxEnvironmentPath.cs (1)
66
if (_fileSystem.
Exists
(DotnetCliToolsProfilePath))
ShellShim\OsxBashEnvironmentPath.cs (1)
54
if (_fileSystem.
Exists
(DotnetCliToolsPathsDPath))
ShellShim\ShellShimRepository.cs (3)
109
foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.
Exists
(f.Value)))
124
foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.
Exists
(f.Value)))
170
return GetShimFiles(toolCommand).Any(p => _fileSystem.File.
Exists
(p.Value));
ToolManifest\ToolManifestFinder.cs (6)
72
if (!_fileSystem.File.
Exists
(possibleManifest.Value))
106
if (!_fileSystem.File.
Exists
(possibleManifest.Value))
138
if (!_fileSystem.File.
Exists
(possibleManifest.Value))
197
if (_fileSystem.File.
Exists
(possibleManifest.Value))
233
|| _fileSystem.File.
Exists
(currentSearchDirectory.Value.WithFile(".git").Value))
279
if (_fileSystem.File.
Exists
(possibleManifest.Value))
ToolPackage\LocalToolsResolverCache.cs (2)
40
if (_fileSystem.File.
Exists
(packageCacheFile))
75
if (_fileSystem.File.
Exists
(packageCacheFile))
ToolPackage\ToolPackageDownloaderBase.cs (1)
383
if (_fileSystem.File.
Exists
(runtimeConfigFilePath))
ToolPackage\ToolPackageInstance.cs (1)
55
bool usingRidSpecificPackage = _fileSystem.File.
Exists
(assetsJsonParentDirectory.WithFile(RidSpecificPackageAssetsFileName).Value);
dotnet.Tests (37)
BuildServerTests\RazorServerTests.cs (9)
37
fileSystemMock.File.
Exists
(pidFilePath).Should().BeTrue();
38
fileSystemMock.File.
Exists
(serverPath).Should().BeTrue();
56
fileSystemMock.File.
Exists
(pidFilePath).Should().BeTrue();
76
fileSystemMock.File.
Exists
(pidFilePath).Should().BeTrue();
77
fileSystemMock.File.
Exists
(serverPath).Should().BeTrue();
90
fileSystemMock.File.
Exists
(pidFilePath).Should().BeFalse();
109
fileSystemMock.File.
Exists
(pidFilePath).Should().BeTrue();
110
fileSystemMock.File.
Exists
(serverPath).Should().BeFalse();
127
fileSystemMock.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)
35
fileSystem.File.
Exists
($"{directory}/filename").Should().BeTrue();
49
fileSystem.File.
Exists
(nestedFilePath).Should().BeTrue();
77
fileSystem.File.
Exists
(Path.Combine(directory, "file")).Should().BeTrue();
227
fileSystem.File.
Exists
(sourceFile).Should().BeFalse();
228
fileSystem.File.
Exists
(destinationFile).Should().BeTrue();
376
fileSystem.File.
Exists
(file).Should().BeFalse();
647
fileSystem.File.
Exists
(Path.Combine(testDestinationDirectoryPath, nestedFilePath)).Should().BeTrue();
Microsoft.DotNet.Configurer (5)
AspNetCertificateSentinel.cs (1)
33
return _fileSystem.File.
Exists
(SentinelPath);
FileSentinel.cs (1)
26
return _fileSystem.File.
Exists
(_file.Value);
FirstTimeUseNoticeSentinel.cs (1)
33
return _fileSystem.File.
Exists
(SentinelPath);
IFileExtensions.cs (1)
18
if (!fileSystem.File.
Exists
(filePath))
UserLevelCacheWriter.cs (1)
33
if (!_file.
Exists
(cacheFilepath))
Microsoft.DotNet.PackageInstall.Tests (4)
ToolPackageDownloaderTests.cs (3)
126
fileSystem.File.
Exists
(assetJsonPath).Should().BeTrue();
815
fileSystem.File.
Exists
(package.Command.Executable.Value).Should().BeTrue($"{package.Command.Executable.Value} should exist");
845
fileSystem.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));