6 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.Engine.UnitTests (1)
FileMatcher_Tests.cs (1)
2684public bool FileExists(string path)
Microsoft.Build.Framework (3)
FileSystem\CachingFileSystemWrapper.cs (1)
43public bool FileExists(string path)
FileSystem\ManagedFileSystem.cs (1)
140public virtual bool FileExists(string path)
FileSystem\MSBuildOnWindowsFileSystem.cs (1)
74public bool FileExists(string path)
166 references to FileExists
Microsoft.Build (35)
BackEnd\BuildManager\BuildManager.cs (2)
3407if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f))) 3409LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("InputCacheFilesDoNotExist", string.Join(";", inputCacheFiles.Where(f => !FileSystems.Default.FileExists(f)))));
BackEnd\BuildManager\BuildParameters.cs (1)
1106if (FileSystems.Default.FileExists(path))
BackEnd\Components\Communications\DetouredNodeLauncher.cs (1)
64if (!FileSystems.Default.FileExists(launchData.MSBuildLocation))
BackEnd\Components\Communications\NodeLauncher.cs (1)
74if (!FileSystems.Default.FileExists(msbuildLocation))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
736if (FileSystems.Default.FileExists(appHostPath))
BackEnd\Components\Communications\RarNodeLauncher.cs (1)
69return FileSystems.Default.FileExists(_pipeName);
BackEnd\Components\FileAccesses\FileAccessManager.cs (1)
148_ = FileSystems.Default.FileExists(filePath);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
351if (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)
1004if (FileSystems.Default.FileExists(cacheFile))
BackEnd\Shared\TargetResult.cs (1)
320if (!FileSystems.Default.FileExists(cacheFile))
BuildEnvironmentHelper.cs (3)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
Construction\ProjectRootElement.cs (2)
1667ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path); 1972if (!FileSystems.Default.FileExists(path))
Construction\Solution\SolutionFile.cs (1)
635if (!FileSystems.Default.FileExists(_solutionFile))
DebugUtils.cs (1)
209while (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)
738if (FileSystems.Default.FileExists(pathToAssembly))
FileSystem\MSBuildFileSystemBase.cs (1)
78public virtual bool FileExists(string path) => FileSystems.Default.FileExists(path);
FrameworkLocationHelper.cs (2)
1437(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1438!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
InprocTrackingNativeMethods.cs (1)
210if (!FileSystems.Default.FileExists(fileTrackerPath))
Logging\BinaryLogger\ProjectImportsCollector.cs (2)
225if (checkFileExistence && !FileSystems.Default.FileExists(filePath)) 271if (FileSystems.Default.FileExists(_archiveFilePath))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
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.Engine.OM.UnitTests (4)
BuildEnvironmentHelper.cs (3)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
DebugUtils.cs (1)
209while (FileSystems.Default.FileExists(fullPath))
Microsoft.Build.Engine.UnitTests (1)
FileMatcher_Tests.cs (1)
2686return FileSystems.Default.FileExists(path);
Microsoft.Build.Framework (8)
FileSystem\CachingFileSystemWrapper.cs (1)
45return CachedExistenceCheck(path, p => _fileSystem.FileExists(p));
FileUtilities.cs (4)
91return !FileSystems.Default.FileExists(lowerCased); 1215? FileExistenceCache.GetOrAdd(fullPath, fullPath => fileSystem.FileExists(fullPath)) 1216: fileSystem.FileExists(fullPath); 1637if (fileSystem.FileExists(possibleFileDirectory))
FileUtilities_TempFiles.cs (1)
186FrameworkErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique");
ItemSpecModifiers.cs (2)
308if (FileSystems.Default.FileExists(unescapedItemSpec)) 324if (FileSystems.Default.FileExists(unescapedItemSpec))
Microsoft.Build.Tasks.Core (76)
AddToWin32Manifest.cs (1)
93if (string.IsNullOrEmpty(ApplicationManifest.ItemSpec) || !FileSystems.Default.FileExists(ApplicationManifest?.ItemSpec))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130ErrorUtilities.VerifyThrow(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (1)
974if (!FileSystems.Default.FileExists(path))
AssemblyDependency\GenerateBindingRedirects.cs (1)
108var outputExists = FileSystems.Default.FileExists(OutputAppConfigFile.ItemSpec);
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)) 2093if (FileSystems.Default.FileExists(fileSource)) 2162if (FileSystems.Default.FileExists(fileSource))
BuildEnvironmentHelper.cs (3)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
Copy.cs (1)
1056if (DestinationFolder != null && FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(DestinationFolder.ItemSpec)))
CreateManifestResourceName.cs (1)
193if (FileSystems.Default.FileExists(Path.Combine(Path.GetDirectoryName(fileName), conventionDependentUpon)))
DebugUtils.cs (1)
209while (FileSystems.Default.FileExists(fullPath))
Delete.cs (1)
129if (FileSystems.Default.FileExists(filePath))
DependencyFile.cs (1)
65if (FileSystems.Default.FileExists(FileName))
Exec.cs (1)
509if (!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)) 2739if (FileSystems.Default.FileExists(outFileOrDir) 2761if (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)
83if (!FileSystems.Default.FileExists(LauncherPath))
ManifestUtil\Manifest.cs (2)
314if (FileSystems.Default.FileExists(path)) 331if (FileSystems.Default.FileExists(resolvedPath))
ManifestUtil\SecurityUtil.cs (6)
661if (!FileSystems.Default.FileExists(path)) 856if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 861if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 869if (NativeMethodsShared.IsWindows && (toolPath == null || !FileSystems.Default.FileExists(toolPath))) 873if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 877if (!FileSystems.Default.FileExists(toolPath))
ManifestUtil\TrustInfo.cs (1)
653if (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)
311if (FileSystems.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
NativeMethods.cs (3)
845if (!FileSystems.Default.FileExists(existingFileName)) 850var targetExists = FileSystems.Default.FileExists(newFileName); 1479if (FileSystems.Default.FileExists(path))
RedistList.cs (1)
1092if (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)
571if (FileSystems.Default.FileExists(reference)) 589.FirstOrDefault(p => FileSystems.Default.FileExists(Path.Combine(p, assemblyFileName))); 815if (deleteSourceCodeFile && sourceCodePath is not null && FileSystems.Default.FileExists(sourceCodePath)) 821if (!_compileForOutOfProcess && !string.IsNullOrEmpty(_assemblyPath) && FileSystems.Default.FileExists(_assemblyPath))
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
47return possibleLocations.Select(possibleLocation => possibleLocation()).FirstOrDefault(FileSystems.Default.FileExists);
StateFileBase.cs (3)
45if (FileSystems.Default.FileExists(stateFile)) 83if (!string.IsNullOrEmpty(stateFile) && FileSystems.Default.FileExists(stateFile)) 140if (FileSystems.Default.FileExists(stateFile))
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))
Unzip.cs (1)
125if (!FileSystems.Default.FileExists(sourceFilePath))
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)
753Assert.True(FileSystems.Default.FileExists(Path), $"A file expected as an output does not exist: {Path}");
Microsoft.Build.Utilities.Core (18)
BuildEnvironmentHelper.cs (3)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
DebugUtils.cs (1)
209while (FileSystems.Default.FileExists(fullPath))
FrameworkLocationHelper.cs (2)
1437(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1438!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
PlatformManifest.cs (1)
97if (FileSystems.Default.FileExists(platformManifestPath))
SDKManifest.cs (1)
316if (FileSystems.Default.FileExists(sdkManifestPath))
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)
532if (string.IsNullOrWhiteSpace(pathToTool) || (ToolPath == null && !FileSystems.Default.FileExists(pathToTool))) 553bool isExistingFile = FileSystems.Default.FileExists(pathToTool); 1349.FirstOrDefault(fullPath => !string.IsNullOrEmpty(fullPath) && FileSystems.Default.FileExists(fullPath)); 1632if (_temporaryBatchFile != null && FileSystems.Default.FileExists(_temporaryBatchFile))
MSBuild (19)
BuildEnvironmentHelper.cs (3)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
CommandLine\CommandLineParser.cs (3)
337else if (!FileSystems.Default.FileExists(responseFile)) 562InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 665if (FileSystems.Default.FileExists(autoResponseFile))
DebugUtils.cs (1)
209while (FileSystems.Default.FileExists(fullPath))
FrameworkLocationHelper.cs (2)
1437(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1438!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
ProjectSchemaValidationHandler.cs (1)
49if (FileSystems.Default.FileExists(schemaFile))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
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))
XMake.cs (4)
399if (!FileSystems.Default.FileExists(path)) 3117InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 3957if (FileSystems.Default.FileExists(testFile)) 4115InitializationException.VerifyThrow(FileSystems.Default.FileExists(fileName), "SchemaNotFoundError", fileName);