6 implementations of FileExists
Microsoft.Build (2)
FileSystem\DirectoryCacheFileSystemWrapper.cs (1)
47
public bool
FileExists
(string path)
FileSystem\MSBuildFileSystemBase.cs (1)
78
public virtual bool
FileExists
(string path) => FileSystems.Default.FileExists(path);
Microsoft.Build.Framework (3)
FileSystem\CachingFileSystemWrapper.cs (1)
43
public bool
FileExists
(string path)
FileSystem\ManagedFileSystem.cs (1)
140
public virtual bool
FileExists
(string path)
FileSystem\MSBuildOnWindowsFileSystem.cs (1)
74
public bool
FileExists
(string path)
Microsoft.Build.Framework.UnitTests (1)
FileMatcher_Tests.cs (1)
2683
public bool
FileExists
(string path)
168 references to FileExists
Microsoft.Build (26)
BackEnd\BuildManager\BuildManager.cs (2)
3488
if (inputCacheFiles.Any(f => !FileSystems.Default.
FileExists
(f)))
3490
LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("InputCacheFilesDoNotExist", string.Join(";", inputCacheFiles.Where(f => !FileSystems.Default.
FileExists
(f)))));
BackEnd\BuildManager\BuildParameters.cs (1)
1097
if (FileSystems.Default.
FileExists
(path))
BackEnd\Components\Communications\DetouredNodeLauncher.cs (1)
64
if (!FileSystems.Default.
FileExists
(launchData.MSBuildLocation))
BackEnd\Components\Communications\NodeLauncher.cs (1)
86
if (!FileSystems.Default.
FileExists
(msbuildLocation))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
816
if (FileSystems.Default.
FileExists
(appHostPath))
BackEnd\Components\Communications\RarNodeLauncher.cs (1)
69
return FileSystems.Default.
FileExists
(_pipeName);
BackEnd\Components\FileAccesses\FileAccessManager.cs (1)
148
_ = FileSystems.Default.
FileExists
(filePath);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
351
if (FileSystems.Default.
FileExists
(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
BackEnd\Components\Scheduler\Scheduler.cs (1)
2754
shouldWriteHeader = !FileSystems.Default.
FileExists
(_debugDumpStateFilePath);
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
154
if (!FileSystems.Default.
FileExists
(planName))
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1024
if (FileSystems.Default.
FileExists
(cacheFile))
BackEnd\Shared\TargetResult.cs (1)
320
if (!FileSystems.Default.
FileExists
(cacheFile))
Construction\ProjectRootElement.cs (2)
1667
ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.
FileExists
(path), "FileToReloadFromDoesNotExist", path);
1972
if (!FileSystems.Default.
FileExists
(path))
Construction\Solution\SolutionFile.cs (1)
635
if (!FileSystems.Default.
FileExists
(_solutionFile))
DebugUtils.cs (1)
80
while (FileSystems.Default.
FileExists
(fullPath))
Definition\ToolsetConfigurationReader.cs (1)
275
FileSystems.Default.
FileExists
(BuildEnvironmentHelper.Instance.CurrentMSBuildConfigurationFile))
Evaluation\Evaluator.cs (2)
1905
if (FileSystems.Default.
FileExists
(dotnetExe))
2260
if (!FileSystems.Default.
FileExists
(importFileUnescaped))
Evaluation\IntrinsicFunctions.cs (1)
738
if (FileSystems.Default.
FileExists
(pathToAssembly))
FileSystem\MSBuildFileSystemBase.cs (1)
78
public virtual bool FileExists(string path) => FileSystems.Default.
FileExists
(path);
InprocTrackingNativeMethods.cs (1)
210
if (!FileSystems.Default.
FileExists
(fileTrackerPath))
Logging\BinaryLogger\ProjectImportsCollector.cs (2)
222
if (checkFileExistence && !FileSystems.Default.
FileExists
(filePath))
268
if (FileSystems.Default.
FileExists
(_archiveFilePath))
TaskEngineAssemblyResolver.cs (1)
106
if (FileSystems.Default.
FileExists
(_taskAssemblyFile))
Microsoft.Build.Framework (15)
BuildEnvironmentHelper.cs (3)
213
if (FileSystems.Default.
FileExists
(msBuildExecutableCandidate))
337
if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.
FileExists
(msBuildExePath))
619
var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.
FileExists
;
FileSystem\CachingFileSystemWrapper.cs (1)
45
return CachedExistenceCheck(path, p => _fileSystem.
FileExists
(p));
FileUtilities.cs (4)
91
return !FileSystems.Default.
FileExists
(lowerCased);
1269
? FileExistenceCache.GetOrAdd(fullPath, fullPath => fileSystem.
FileExists
(fullPath))
1270
: fileSystem.
FileExists
(fullPath);
1691
if (fileSystem.
FileExists
(possibleFileDirectory))
FileUtilities_TempFiles.cs (1)
195
FrameworkErrorUtilities.VerifyThrow(!FileSystems.Default.
FileExists
(file), "Guid should be unique");
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)
140
if (!string.IsNullOrEmpty(assemblyPath) && FileSystems.Default.
FileExists
(assemblyPath))
190
if (!FileSystems.Default.
FileExists
(manifestPath))
258
if (FileSystems.Default.
FileExists
(path))
266
if (FileSystems.Default.
FileExists
(path))
Microsoft.Build.Framework.UnitTests (1)
FileMatcher_Tests.cs (1)
2685
return FileSystems.Default.
FileExists
(path);
Microsoft.Build.Tasks.Core (94)
AddToWin32Manifest.cs (1)
104
if (!FileSystems.Default.
FileExists
(absolutePath))
Al.cs (1)
313
if (String.IsNullOrEmpty(pathToTool) || !FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(pathToTool)))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130
ErrorUtilities.VerifyThrow(FileSystems.Default.
FileExists
(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (2)
100
if (FileSystems.Default.
FileExists
(newLocation))
939
if (!FileSystems.Default.
FileExists
(path))
AssemblyDependency\GenerateBindingRedirects.cs (1)
108
var outputExists = FileSystems.Default.
FileExists
(OutputAppConfigFile.ItemSpec);
AxTlbBaseReference.cs (2)
131
if (!FileSystems.Default.
FileExists
(wrapperPath))
153
if (!FileSystems.Default.
FileExists
(wrapperInfo.path))
AxTlbBaseTask.cs (1)
182
if (FileSystems.Default.
FileExists
(KeyFile))
BootstrapperUtil\BootstrapperBuilder.cs (10)
363
if (!FileSystems.Default.
FileExists
(setupSourceFile))
537
if (FileSystems.Default.
FileExists
(resourceFilePath))
810
bool fileExists = FileSystems.Default.
FileExists
(filePath);
811
bool schemaExists = FileSystems.Default.
FileExists
(schemaPath);
938
if (FileSystems.Default.
FileExists
(strLangManifestFilename))
1453
if (!FileSystems.Default.
FileExists
(packageFileSource.Value))
1471
if (!FileSystems.Default.
FileExists
(packageFileSource.Value))
1524
if (FileSystems.Default.
FileExists
(eulaAttribute.Value))
2094
if (FileSystems.Default.
FileExists
(fileSource))
2163
if (FileSystems.Default.
FileExists
(fileSource))
CodeTaskFactory.cs (1)
647
if (!FileSystems.Default.
FileExists
(referenceAssembly))
ComReferenceInfo.cs (1)
149
this.strippedTypeLibPath = ComReference.StripTypeLibNumberFromPath(path, FileSystems.Default.
FileExists
);
Copy.cs (1)
1065
if (DestinationFolder != null && FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(DestinationFolder.ItemSpec)))
CreateManifestResourceName.cs (1)
197
if (FileSystems.Default.
FileExists
(dependentPath))
DebugUtils.cs (1)
80
while (FileSystems.Default.
FileExists
(fullPath))
Delete.cs (1)
129
if (FileSystems.Default.
FileExists
(filePath))
DependencyFile.cs (1)
65
if (FileSystems.Default.
FileExists
(FileName))
FileIO\GetFileHash.cs (1)
93
if (!FileSystems.Default.
FileExists
(filePath))
FileIO\ReadLinesFromFile.cs (1)
46
if (FileSystems.Default.
FileExists
(filePath))
FileIO\VerifyFileHash.cs (1)
48
if (!FileSystems.Default.
FileExists
(filePath))
GenerateResource.cs (8)
1170
if (!FileSystems.Default.
FileExists
(outputFile.ItemSpec))
1208
if (!FileSystems.Default.
FileExists
(outputFile.ItemSpec))
1407
if (!FileSystems.Default.
FileExists
(Sources[i].ItemSpec))
1432
if (nothingOutOfDate && FileSystems.Default.
FileExists
(Sources[0].ItemSpec))
2524
if (assemblyFile.ItemSpec != null && FileSystems.Default.
FileExists
(assemblyFile.ItemSpec))
2737
if (FileSystems.Default.
FileExists
(outFileOrDir)
2759
if (FileSystems.Default.
FileExists
(currentOutputFile))
3073
if (!FileSystems.Default.
FileExists
(name))
GenerateTrustInfo.cs (1)
53
if (BaseManifest != null && FileSystems.Default.
FileExists
(BaseManifest.ItemSpec))
GetAssembliesMetadata.cs (1)
42
if (FileSystems.Default.
FileExists
(assemblyPath))
GetSDKReferenceFiles.cs (1)
1100
if (FileSystems.Default.
FileExists
(referencesCacheFile) && currentCodeLastWriteTime < referencesCacheFileLastWriteTimeUtc)
ManifestUtil\AssemblyIdentity.cs (6)
199
if (!FileSystems.Default.
FileExists
(path))
273
if (!FileSystems.Default.
FileExists
(path))
307
if (!FileSystems.Default.
FileExists
(path))
333
if (!FileSystems.Default.
FileExists
(path))
535
if (FileSystems.Default.
FileExists
(path) && IsEqual(this, FromFile(path), specificVersion))
542
if (FileSystems.Default.
FileExists
(path) && IsEqual(this, FromManifest(path), specificVersion))
ManifestUtil\DeployManifest.cs (2)
150
if (FileSystems.Default.
FileExists
(redistListFilePath))
583
if (FileSystems.Default.
FileExists
(manifestPath))
ManifestUtil\LauncherBuilder.cs (1)
83
if (!FileSystems.Default.
FileExists
(LauncherPath))
ManifestUtil\Manifest.cs (2)
319
if (FileSystems.Default.
FileExists
(path))
336
if (FileSystems.Default.
FileExists
(resolvedPath))
ManifestUtil\SecurityUtil.cs (6)
656
if (!FileSystems.Default.
FileExists
(path))
851
if (toolPath == null || !FileSystems.Default.
FileExists
(toolPath))
856
if (toolPath == null || !FileSystems.Default.
FileExists
(toolPath))
864
if (NativeMethodsShared.IsWindows && (toolPath == null || !FileSystems.Default.
FileExists
(toolPath)))
868
if (toolPath == null || !FileSystems.Default.
FileExists
(toolPath))
872
if (!FileSystems.Default.
FileExists
(toolPath))
ManifestUtil\TrustInfo.cs (1)
655
if (FileSystems.Default.
FileExists
(path))
Move.cs (3)
231
if (!FileSystems.Default.
FileExists
(sourceFile))
238
if (OverwriteReadOnlyFiles && FileSystems.Default.
FileExists
(destinationFile))
280
if (FileSystems.Default.
FileExists
(destinationFile))
MSBuild.cs (1)
311
if (FileSystems.Default.
FileExists
(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
NativeMethods.cs (3)
587
if (!FileSystems.Default.
FileExists
(existingFileName))
592
var targetExists = FileSystems.Default.
FileExists
(newFileName);
1082
if (FileSystems.Default.
FileExists
(path))
RedistList.cs (1)
1092
if (FileSystems.Default.
FileExists
(subsetFilePath))
RegisterAssembly.cs (2)
215
if (!FileSystems.Default.
FileExists
(assemblyPath))
243
if ((!FileSystems.Default.
FileExists
(typeLibPath)) ||
ResGen.cs (3)
260
if (FileSystems.Default.
FileExists
(outputFiles[i].ItemSpec))
277
if (!FileSystems.Default.
FileExists
(outputFile.ItemSpec))
510
if (!FileSystems.Default.
FileExists
(pathToTool))
ResGenDependencies.cs (1)
232
if (FileSystems.Default.
FileExists
(FileName))
ResolveCodeAnalysisRuleSet.cs (4)
87
if (FileSystems.Default.
FileExists
(fullName))
99
if (FileSystems.Default.
FileExists
(fullName))
112
if (FileSystems.Default.
FileExists
(fullName))
118
else if (FileSystems.Default.
FileExists
(CodeAnalysisRuleSet))
ResolveKeySource.cs (1)
209
if (!FileSystems.Default.
FileExists
(CertificateFile))
ResolveNativeReference.cs (1)
124
if (String.IsNullOrEmpty(path) || !FileSystems.Default.
FileExists
(path))
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (4)
582
if (FileSystems.Default.
FileExists
(reference))
600
.FirstOrDefault(p => FileSystems.Default.
FileExists
(Path.Combine(p, assemblyFileName)));
826
if (deleteSourceCodeFile && sourceCodePath is not null && FileSystems.Default.
FileExists
(sourceCodePath))
832
if (!_compileForOutOfProcess && !string.IsNullOrEmpty(_assemblyPath) && FileSystems.Default.
FileExists
(_assemblyPath))
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
47
return possibleLocations.Select(possibleLocation => possibleLocation()).FirstOrDefault(FileSystems.Default.
FileExists
);
SGen.cs (3)
310
if (String.IsNullOrEmpty(pathToTool) || !FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(pathToTool)))
332
if (string.IsNullOrEmpty(reference) || !FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(reference)))
421
serializationAssemblyPathExists = FileSystems.Default.
FileExists
(SerializationAssemblyPath);
StateFileBase.cs (3)
45
if (FileSystems.Default.
FileExists
(stateFile))
83
if (!string.IsNullOrEmpty(stateFile) && FileSystems.Default.
FileExists
(stateFile))
140
if (FileSystems.Default.
FileExists
(stateFile))
UnregisterAssembly.cs (2)
157
if (FileSystems.Default.
FileExists
(assemblyPath))
231
if (FileSystems.Default.
FileExists
(typeLibPath))
Unzip.cs (1)
125
if (!FileSystems.Default.
FileExists
(sourceFilePath))
XamlTaskFactory\TaskParser.cs (2)
143
if (!FileSystems.Default.
FileExists
(contentOrFile))
161
if (FileSystems.Default.
FileExists
(maybeFullPath))
Microsoft.Build.UnitTests.Shared (5)
ObjectModelHelpers.cs (4)
578
Assert.True(FileSystems.Default.
FileExists
(Path.Combine(TempProjectDir, fileRelativePath)), message);
1052
if (FileSystems.Default.
FileExists
(files[i]))
1691
Assert.True(FileSystems.Default.
FileExists
(fullPath));
1876
if (FileSystems.Default.
FileExists
(path))
TestEnvironment.cs (1)
762
Assert.True(FileSystems.Default.
FileExists
(Path), $"A file expected as an output does not exist: {Path}");
Microsoft.Build.Utilities.Core (17)
DebugUtils.cs (1)
80
while (FileSystems.Default.
FileExists
(fullPath))
InprocTrackingNativeMethods.cs (1)
210
if (!FileSystems.Default.
FileExists
(fileTrackerPath))
PlatformManifest.cs (1)
97
if (FileSystems.Default.
FileExists
(platformManifestPath))
SDKManifest.cs (1)
316
if (FileSystems.Default.
FileExists
(sdkManifestPath))
ToolLocationHelper.cs (6)
1503
if (!FileSystems.Default.
FileExists
(fullPath))
1766
if (FileSystems.Default.
FileExists
(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
1840
if (legacyMsCorlib20Path != null && FileSystems.Default.
FileExists
(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll")))
1857
if (FileSystems.Default.
FileExists
(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
2632
bool platformSDKManifestExists = FileSystems.Default.
FileExists
(platformSDKManifest);
3119
if (!FileSystems.Default.
FileExists
(redistFilePath))
ToolTask.cs (4)
534
if (string.IsNullOrWhiteSpace(pathToTool) || (ToolPath == null && !FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(pathToTool))))
555
bool isExistingFile = FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(pathToTool));
1439
.FirstOrDefault(fullPath => !string.IsNullOrEmpty(fullPath) && FileSystems.Default.
FileExists
(TaskEnvironment.GetAbsolutePath(fullPath)));
1722
if (_temporaryBatchFile != null && FileSystems.Default.
FileExists
(_temporaryBatchFile))
TrackedDependencies\FileTracker.cs (3)
434
if (FileSystems.Default.
FileExists
(trackerPath))
534
if (!FileSystems.Default.
FileExists
(trackerPath))
580
if (FileSystems.Default.
FileExists
(progfilesPath))
MSBuild (10)
CommandLine\CommandLineParser.cs (3)
337
else if (!FileSystems.Default.
FileExists
(responseFile))
562
InitializationException.VerifyThrow(FileSystems.Default.
FileExists
(projectFile), "ProjectNotFoundError", projectFile);
665
if (FileSystems.Default.
FileExists
(autoResponseFile))
DebugUtils.cs (1)
80
while (FileSystems.Default.
FileExists
(fullPath))
ProjectSchemaValidationHandler.cs (1)
49
if (FileSystems.Default.
FileExists
(schemaFile))
TaskEngineAssemblyResolver.cs (1)
106
if (FileSystems.Default.
FileExists
(_taskAssemblyFile))
XMake.cs (4)
399
if (!FileSystems.Default.
FileExists
(path))
3130
InitializationException.VerifyThrow(FileSystems.Default.
FileExists
(projectFile), "ProjectNotFoundError", projectFile);
3970
if (FileSystems.Default.
FileExists
(testFile))
4138
InitializationException.VerifyThrow(FileSystems.Default.
FileExists
(fileName), "SchemaNotFoundError", fileName);