6 implementations of FileExists
Microsoft.Build (5)
CachingFileSystemWrapper.cs (1)
44public bool FileExists(string path)
FileSystem\DirectoryCacheFileSystemWrapper.cs (1)
49public bool FileExists(string path)
FileSystem\MSBuildFileSystemBase.cs (1)
80public virtual bool FileExists(string path) => FileSystems.Default.FileExists(path);
ManagedFileSystem.cs (1)
144public virtual bool FileExists(string path)
MSBuildOnWindowsFileSystem.cs (1)
76public bool FileExists(string path)
Microsoft.Build.Engine.UnitTests (1)
FileMatcher_Tests.cs (1)
2684public bool FileExists(string path)
56 references to FileExists
Microsoft.Build (47)
BackEnd\BuildManager\BuildManager.cs (2)
3291if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f))) 3293LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("InputCacheFilesDoNotExist", string.Join(";", inputCacheFiles.Where(f => !FileSystems.Default.FileExists(f)))));
BackEnd\BuildManager\BuildParameters.cs (1)
1100if (FileSystems.Default.FileExists(path))
BackEnd\Components\Communications\CurrentHost.cs (2)
32if (FileSystems.Default.FileExists(dotnetExe)) 52if (FileSystems.Default.FileExists(dotnetExe))
BackEnd\Components\Communications\NodeLauncher.cs (1)
53if (!FileSystems.Default.FileExists(msbuildLocation))
BackEnd\Components\Communications\RarNodeLauncher.cs (1)
68return FileSystems.Default.FileExists(_pipeName);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
345if (FileSystems.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
BackEnd\Components\Scheduler\Scheduler.cs (1)
2707shouldWriteHeader = !FileSystems.Default.FileExists(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId));
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
154if (!FileSystems.Default.FileExists(planName))
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1003if (FileSystems.Default.FileExists(cacheFile))
BackEnd\Shared\TargetResult.cs (1)
300if (!FileSystems.Default.FileExists(cacheFile))
BuildEnvironmentHelper.cs (4)
213if (FileSystems.Default.FileExists(msBuildExe)) 217else if (FileSystems.Default.FileExists(msBuildDll)) 341if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 611var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
CachingFileSystemWrapper.cs (1)
46return CachedExistenceCheck(path, p => _fileSystem.FileExists(p));
Construction\ProjectRootElement.cs (2)
1667ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path); 1972if (!FileSystems.Default.FileExists(path))
Construction\Solution\SolutionFile.cs (1)
636if (!FileSystems.Default.FileExists(_solutionFile))
CoreCLRAssemblyLoader.cs (1)
164!FileSystems.Default.FileExists(candidatePath))
DebugUtils.cs (1)
116while (FileSystems.Default.FileExists(fullPath))
Definition\ToolsetConfigurationReader.cs (1)
275FileSystems.Default.FileExists(BuildEnvironmentHelper.Instance.CurrentMSBuildConfigurationFile))
Evaluation\Evaluator.cs (2)
1905if (FileSystems.Default.FileExists(dotnetExe)) 2260if (!FileSystems.Default.FileExists(importFileUnescaped))
Evaluation\IntrinsicFunctions.cs (1)
742if (FileSystems.Default.FileExists(pathToAssembly))
FileSystem\MSBuildFileSystemBase.cs (1)
80public virtual bool FileExists(string path) => FileSystems.Default.FileExists(path);
FileUtilities.cs (4)
81return !FileSystems.Default.FileExists(lowerCased); 1087? FileExistenceCache.GetOrAdd(fullPath, fullPath => fileSystem.FileExists(fullPath)) 1088: fileSystem.FileExists(fullPath); 1515if (fileSystem.FileExists(possibleFileDirectory))
FrameworkLocationHelper.cs (2)
1435(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, NativeMethodsShared.IsWindows ? "MSBuild.exe" : "mcs.exe")) && 1436!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
Logging\BinaryLogger\ProjectImportsCollector.cs (2)
225if (checkFileExistence && !FileSystems.Default.FileExists(filePath)) 271if (FileSystems.Default.FileExists(_archiveFilePath))
Modifiers.cs (2)
329if (FileSystems.Default.FileExists(unescapedItemSpec)) 345if (FileSystems.Default.FileExists(unescapedItemSpec))
MSBuildLoadContext.cs (4)
43_resolver = FileSystems.Default.FileExists(assemblyPath) && FileSystems.Default.FileExists(Path.ChangeExtension(assemblyPath, ".deps.json")) 80if (!FileSystems.Default.FileExists(candidatePath)) 101if (FileSystems.Default.FileExists(assemblyNameInExecutableDirectory))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
TaskFactoryUtilities.cs (4)
156if (!string.IsNullOrEmpty(assemblyPath) && FileSystems.Default.FileExists(assemblyPath)) 206if (!FileSystems.Default.FileExists(manifestPath)) 273if (FileSystems.Default.FileExists(path)) 281if (FileSystems.Default.FileExists(path))
TempFileUtilities.cs (1)
188ErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique");
Microsoft.Build.BuildCheck.UnitTests (1)
TestAssemblyInfo.cs (1)
122if (FileSystems.Default.FileExists(potentialVersionsPropsPath))
Microsoft.Build.Engine.UnitTests (2)
FileMatcher_Tests.cs (1)
2686return FileSystems.Default.FileExists(path);
TestAssemblyInfo.cs (1)
122if (FileSystems.Default.FileExists(potentialVersionsPropsPath))
Microsoft.Build.Framework.UnitTests (1)
TestAssemblyInfo.cs (1)
122if (FileSystems.Default.FileExists(potentialVersionsPropsPath))
Microsoft.Build.UnitTests.Shared (5)
ObjectModelHelpers.cs (4)
579Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message); 1049if (FileSystems.Default.FileExists(files[i])) 1688Assert.True(FileSystems.Default.FileExists(fullPath)); 1873if (FileSystems.Default.FileExists(path))
TestEnvironment.cs (1)
747Assert.True(FileSystems.Default.FileExists(Path), $"A file expected as an output does not exist: {Path}");