4 implementations of FileExists
Microsoft.Build (2)
FileSystem\DirectoryCacheFileSystemWrapper.cs (1)
47public bool FileExists(string path)
FileSystem\MSBuildFileSystemBase.cs (1)
78public virtual bool FileExists(string path) => FileSystems.Default.FileExists(path);
Microsoft.Build.Framework (2)
FileSystem\CachingFileSystemWrapper.cs (1)
43public bool FileExists(string path)
FileSystem\ManagedFileSystem.cs (1)
140public virtual bool FileExists(string path)
135 references to FileExists
Microsoft.Build (25)
BackEnd\BuildManager\BuildManager.cs (2)
3481if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f))) 3483LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("InputCacheFilesDoNotExist", string.Join(";", inputCacheFiles.Where(f => !FileSystems.Default.FileExists(f)))));
BackEnd\BuildManager\BuildParameters.cs (1)
1097if (FileSystems.Default.FileExists(path))
BackEnd\Components\Communications\CurrentHost.cs (2)
34if (FileSystems.Default.FileExists(dotnetExe)) 54host = FileSystems.Default.FileExists(dotnetExe)
BackEnd\Components\Communications\NodeLauncher.cs (1)
86if (!FileSystems.Default.FileExists(msbuildLocation))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
856return FileSystems.Default.FileExists(appHostPath)
BackEnd\Components\Communications\RarNodeLauncher.cs (1)
69return FileSystems.Default.FileExists(_pipeName);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
336if (FileSystems.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
BackEnd\Components\Scheduler\Scheduler.cs (1)
2748shouldWriteHeader = !FileSystems.Default.FileExists(_debugDumpStateFilePath);
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
154if (!FileSystems.Default.FileExists(planName))
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1020if (FileSystems.Default.FileExists(cacheFile))
BackEnd\Shared\TargetResult.cs (1)
319if (!FileSystems.Default.FileExists(cacheFile))
Construction\ProjectRootElement.cs (2)
1661ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path); 1966if (!FileSystems.Default.FileExists(path))
Construction\Solution\SolutionFile.cs (1)
635if (!FileSystems.Default.FileExists(_solutionFile))
Definition\ToolsetConfigurationReader.cs (1)
274FileSystems.Default.FileExists(BuildEnvironmentHelper.Instance.CurrentMSBuildConfigurationFile))
Evaluation\Evaluator.cs (2)
1905if (FileSystems.Default.FileExists(dotnetExe)) 2260if (!FileSystems.Default.FileExists(importFileUnescaped))
Evaluation\IntrinsicFunctions.cs (1)
738if (FileSystems.Default.FileExists(pathToAssembly))
FileSystem\MSBuildFileSystemBase.cs (1)
78public virtual bool FileExists(string path) => FileSystems.Default.FileExists(path);
Logging\BinaryLogger\ProjectImportsCollector.cs (2)
222if (checkFileExistence && !FileSystems.Default.FileExists(filePath)) 268if (FileSystems.Default.FileExists(_archiveFilePath))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (1)
80while (FileSystems.Default.FileExists(fullPath))
src\msbuild\src\Shared\TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
Microsoft.Build.Framework (20)
BuildEnvironmentHelper.cs (3)
213if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 337if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 620var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
FileSystem\CachingFileSystemWrapper.cs (1)
45return CachedExistenceCheck(path, p => _fileSystem.FileExists(p));
FileUtilities.cs (4)
91return !FileSystems.Default.FileExists(lowerCased); 1269? FileExistenceCache.GetOrAdd(fullPath, fullPath => fileSystem.FileExists(fullPath)) 1270: fileSystem.FileExists(fullPath); 1691if (fileSystem.FileExists(possibleFileDirectory))
FileUtilities_TempFiles.cs (1)
195Assumed.False(FileSystems.Default.FileExists(file), "Guid should be unique");
Loader\CoreCLRAssemblyLoader.cs (1)
166!FileSystems.Default.FileExists(candidatePath))
Loader\MSBuildLoadContext.cs (4)
45_resolver = FileSystems.Default.FileExists(assemblyPath) && FileSystems.Default.FileExists(Path.ChangeExtension(assemblyPath, ".deps.json")) 82if (!FileSystems.Default.FileExists(candidatePath)) 104if (FileSystems.Default.FileExists(assemblyNameInExecutableDirectory))
Utilities\FrameworkLocationHelper.cs (2)
1453(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1454!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
Utilities\TaskFactoryUtilities.cs (4)
140if (!string.IsNullOrEmpty(assemblyPath) && FileSystems.Default.FileExists(assemblyPath)) 190if (!FileSystems.Default.FileExists(manifestPath)) 258if (FileSystems.Default.FileExists(path)) 266if (FileSystems.Default.FileExists(path))
Microsoft.Build.Tasks.Core (69)
AddToWin32Manifest.cs (1)
104if (!FileSystems.Default.FileExists(absolutePath))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130Assumed.True(FileSystems.Default.FileExists(_assemblyFolderConfigFile), $"The AssemblyFolders config file specified does not exist: {_assemblyFolderConfigFile}");
AssemblyDependency\AssemblyInformation.cs (1)
994if (!FileSystems.Default.FileExists(path))
AssemblyDependency\GenerateBindingRedirects.cs (1)
113var outputExists = FileSystems.Default.FileExists(outputAppConfigFile);
BootstrapperUtil\BootstrapperBuilder.cs (10)
363if (!FileSystems.Default.FileExists(setupSourceFile)) 537if (FileSystems.Default.FileExists(resourceFilePath)) 810bool fileExists = FileSystems.Default.FileExists(filePath); 811bool schemaExists = FileSystems.Default.FileExists(schemaPath); 938if (FileSystems.Default.FileExists(strLangManifestFilename)) 1453if (!FileSystems.Default.FileExists(packageFileSource.Value)) 1471if (!FileSystems.Default.FileExists(packageFileSource.Value)) 1524if (FileSystems.Default.FileExists(eulaAttribute.Value)) 2094if (FileSystems.Default.FileExists(fileSource)) 2163if (FileSystems.Default.FileExists(fileSource))
Copy.cs (1)
1072if (DestinationFolder != null && FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(DestinationFolder.ItemSpec)))
CreateManifestResourceName.cs (1)
197if (FileSystems.Default.FileExists(dependentPath))
Delete.cs (1)
128if (FileSystems.Default.FileExists(filePath))
DependencyFile.cs (1)
65if (FileSystems.Default.FileExists(FileName))
Exec.cs (1)
513if (!FileSystems.Default.FileExists(systemCmd))
FileIO\GetFileHash.cs (1)
93if (!FileSystems.Default.FileExists(filePath))
FileIO\ReadLinesFromFile.cs (1)
46if (FileSystems.Default.FileExists(filePath))
FileIO\VerifyFileHash.cs (1)
48if (!FileSystems.Default.FileExists(filePath))
GenerateResource.cs (5)
1407if (!FileSystems.Default.FileExists(Sources[i].ItemSpec)) 1432if (nothingOutOfDate && FileSystems.Default.FileExists(Sources[0].ItemSpec)) 2524if (assemblyFile.ItemSpec != null && FileSystems.Default.FileExists(assemblyFile.ItemSpec)) 2735if (FileSystems.Default.FileExists(outFileOrDir) 2757if (FileSystems.Default.FileExists(currentOutputFile))
GetSDKReferenceFiles.cs (1)
1100if (FileSystems.Default.FileExists(referencesCacheFile) && currentCodeLastWriteTime < referencesCacheFileLastWriteTimeUtc)
ManifestUtil\AssemblyIdentity.cs (6)
199if (!FileSystems.Default.FileExists(path)) 273if (!FileSystems.Default.FileExists(path)) 307if (!FileSystems.Default.FileExists(path)) 333if (!FileSystems.Default.FileExists(path)) 535if (FileSystems.Default.FileExists(path) && IsEqual(this, FromFile(path), specificVersion)) 542if (FileSystems.Default.FileExists(path) && IsEqual(this, FromManifest(path), specificVersion))
ManifestUtil\DeployManifest.cs (2)
150if (FileSystems.Default.FileExists(redistListFilePath)) 583if (FileSystems.Default.FileExists(manifestPath))
ManifestUtil\LauncherBuilder.cs (1)
100if (!FileSystems.Default.FileExists(launcher.Value))
ManifestUtil\Manifest.cs (2)
319if (FileSystems.Default.FileExists(path)) 336if (FileSystems.Default.FileExists(resolvedPath))
ManifestUtil\SecurityUtil.cs (6)
656if (!FileSystems.Default.FileExists(path)) 851if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 856if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 864if (NativeMethodsShared.IsWindows && (toolPath == null || !FileSystems.Default.FileExists(toolPath))) 868if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 872if (!FileSystems.Default.FileExists(toolPath))
ManifestUtil\TrustInfo.cs (1)
655if (FileSystems.Default.FileExists(path))
Move.cs (3)
231if (!FileSystems.Default.FileExists(sourceFile)) 238if (OverwriteReadOnlyFiles && FileSystems.Default.FileExists(destinationFile)) 280if (FileSystems.Default.FileExists(destinationFile))
MSBuild.cs (1)
295if (FileSystems.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
NativeMethods.cs (3)
149if (!FileSystems.Default.FileExists(existingFileName)) 154var targetExists = FileSystems.Default.FileExists(newFileName); 647if (FileSystems.Default.FileExists(path))
RedistList.cs (1)
1111if (FileSystems.Default.FileExists(subsetFilePath))
ResGenDependencies.cs (1)
232if (FileSystems.Default.FileExists(FileName))
ResolveCodeAnalysisRuleSet.cs (4)
87if (FileSystems.Default.FileExists(fullName)) 99if (FileSystems.Default.FileExists(fullName)) 112if (FileSystems.Default.FileExists(fullName)) 118else if (FileSystems.Default.FileExists(CodeAnalysisRuleSet))
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (4)
582if (FileSystems.Default.FileExists(reference)) 600.FirstOrDefault(p => FileSystems.Default.FileExists(Path.Combine(p, assemblyFileName))); 826if (deleteSourceCodeFile && sourceCodePath is not null && FileSystems.Default.FileExists(sourceCodePath)) 832if (!_compileForOutOfProcess && !string.IsNullOrEmpty(_assemblyPath) && FileSystems.Default.FileExists(_assemblyPath))
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
47return possibleLocations.Select(possibleLocation => possibleLocation()).FirstOrDefault(FileSystems.Default.FileExists);
src\msbuild\src\Shared\Debugging\DebugUtils.cs (1)
80while (FileSystems.Default.FileExists(fullPath))
StateFileBase.cs (3)
62if (FileSystems.Default.FileExists(stateFile)) 117if (!string.IsNullOrEmpty(stateFile) && FileSystems.Default.FileExists(stateFile)) 175if (FileSystems.Default.FileExists(stateFile))
Unzip.cs (1)
125if (!FileSystems.Default.FileExists(sourceFilePath))
Microsoft.Build.Utilities.Core (13)
PlatformManifest.cs (1)
97if (FileSystems.Default.FileExists(platformManifestPath))
SDKManifest.cs (1)
315if (FileSystems.Default.FileExists(sdkManifestPath))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (1)
80while (FileSystems.Default.FileExists(fullPath))
ToolLocationHelper.cs (6)
1503if (!FileSystems.Default.FileExists(fullPath)) 1766if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll"))) 1840if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll"))) 1857if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll"))) 2632bool platformSDKManifestExists = FileSystems.Default.FileExists(platformSDKManifest); 3119if (!FileSystems.Default.FileExists(redistFilePath))
ToolTask.cs (4)
534if (string.IsNullOrWhiteSpace(pathToTool) || (ToolPath == null && !FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(pathToTool)))) 555bool isExistingFile = FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(pathToTool)); 1440.FirstOrDefault(fullPath => !string.IsNullOrEmpty(fullPath) && FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(fullPath))); 1722if (_temporaryBatchFile != null && FileSystems.Default.FileExists(_temporaryBatchFile))
MSBuild (8)
CommandLine\CommandLineParser.cs (3)
337else if (!FileSystems.Default.FileExists(responseFile)) 562InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 663if (FileSystems.Default.FileExists(autoResponseFile))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (1)
80while (FileSystems.Default.FileExists(fullPath))
src\msbuild\src\Shared\TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
XMake.cs (3)
399if (!FileSystems.Default.FileExists(path)) 3130InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 3968if (FileSystems.Default.FileExists(testFile))