119 references to FileSystems
Microsoft.Build.Tasks.Core (118)
AddToWin32Manifest.cs (1)
93
if (string.IsNullOrEmpty(ApplicationManifest.ItemSpec) || !
FileSystems
.Default.FileExists(ApplicationManifest?.ItemSpec))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130
ErrorUtilities.VerifyThrow(
FileSystems
.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (1)
972
if (!
FileSystems
.Default.FileExists(path))
AssemblyDependency\GenerateBindingRedirects.cs (1)
108
var outputExists =
FileSystems
.Default.FileExists(OutputAppConfigFile.ItemSpec);
AssemblyDependency\ResolveAssemblyReference.cs (1)
3296
(p, searchPattern) =>
FileSystems
.Default.EnumerateDirectories(p, searchPattern).ToArray(),
BootstrapperUtil\BootstrapperBuilder.cs (13)
363
if (!
FileSystems
.Default.FileExists(setupSourceFile))
531
if (
FileSystems
.Default.DirectoryExists(startDirectory))
537
if (
FileSystems
.Default.FileExists(resourceFilePath))
601
if (
FileSystems
.Default.DirectoryExists(packagePath))
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))
1582
if (!
FileSystems
.Default.DirectoryExists(strFolderPath))
2093
if (
FileSystems
.Default.FileExists(fileSource))
2162
if (
FileSystems
.Default.FileExists(fileSource))
BuildEnvironmentHelper.cs (6)
213
if (
FileSystems
.Default.FileExists(msBuildExe))
217
else if (
FileSystems
.Default.FileExists(msBuildDll))
273
vsVersion != CurrentVisualStudioVersion || !
FileSystems
.Default.DirectoryExists(vsInstallDir))
298
.Where(i => i.Version.Major == v.Major &&
FileSystems
.Default.DirectoryExists(i.Path))
341
if (!string.IsNullOrEmpty(msBuildExePath) &&
FileSystems
.Default.FileExists(msBuildExePath))
611
var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) :
FileSystems
.Default.FileExists;
Copy.cs (2)
287
if (!
FileSystems
.Default.DirectoryExists(destinationFolder))
1009
if (DestinationFolder != null &&
FileSystems
.Default.FileExists(DestinationFolder.ItemSpec))
CreateManifestResourceName.cs (1)
193
if (
FileSystems
.Default.FileExists(Path.Combine(Path.GetDirectoryName(fileName), conventionDependentUpon)))
DebugUtils.cs (1)
116
while (
FileSystems
.Default.FileExists(fullPath))
Delete.cs (1)
122
if (
FileSystems
.Default.FileExists(file.ItemSpec))
DependencyFile.cs (1)
66
if (
FileSystems
.Default.FileExists(FileName))
ExceptionHandling.cs (3)
412
IEnumerable<string> files =
FileSystems
.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt");
416
if (
FileSystems
.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc)
422
builder.Append(
FileSystems
.Default.ReadFileAllText(file));
Exec.cs (2)
506
if (!
FileSystems
.Default.FileExists(systemCmd))
531
if (!
FileSystems
.Default.DirectoryExists(_workingDirectory))
FileIO\GetFileHash.cs (1)
88
if (!
FileSystems
.Default.FileExists(file.ItemSpec))
FileIO\ReadLinesFromFile.cs (1)
41
if (
FileSystems
.Default.FileExists(File.ItemSpec))
FileIO\VerifyFileHash.cs (1)
42
if (!
FileSystems
.Default.FileExists(File))
FileIO\WriteLinesToFile.cs (1)
114
string existingContents =
FileSystems
.Default.ReadFileAllText(File.ItemSpec);
FileMatcher.cs (1)
90
public static FileMatcher Default = new FileMatcher(
FileSystems
.Default, null);
FileUtilities.cs (3)
81
return !
FileSystems
.Default.FileExists(lowerCased);
135
private static readonly IFileSystem DefaultFileSystem =
FileSystems
.Default;
751
foreach (string dir in
FileSystems
.Default.EnumerateDirectories(directory))
GenerateResource.cs (7)
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))
2675
if (!
FileSystems
.Default.DirectoryExists(currentOutputDirectory))
2739
if (
FileSystems
.Default.FileExists(outFileOrDir)
2761
if (
FileSystems
.Default.FileExists(currentOutputFile))
2849
if (!
FileSystems
.Default.DirectoryExists(shorterPath))
GetSDKReferenceFiles.cs (4)
927
string cacheFile =
FileSystems
.Default.EnumerateFiles(_cacheFileDirectory, GetCacheFileName(sdkIdentity, sdkRoot, "*")).FirstOrDefault();
1088
DateTime referencesCacheFileLastWriteTimeUtc =
FileSystems
.Default.GetLastWriteTimeUtc(referencesCacheFile);
1099
DateTime currentCodeLastWriteTime =
FileSystems
.Default.GetLastWriteTimeUtc(codeBase.LocalPath);
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 (2)
83
if (!
FileSystems
.Default.FileExists(LauncherPath))
106
if (!
FileSystems
.Default.DirectoryExists(strFolderPath))
ManifestUtil\Manifest.cs (2)
314
if (
FileSystems
.Default.FileExists(path))
331
if (
FileSystems
.Default.FileExists(resolvedPath))
ManifestUtil\SecurityUtil.cs (6)
661
if (!
FileSystems
.Default.FileExists(path))
856
if (toolPath == null || !
FileSystems
.Default.FileExists(toolPath))
861
if (toolPath == null || !
FileSystems
.Default.FileExists(toolPath))
869
if (NativeMethodsShared.IsWindows && (toolPath == null || !
FileSystems
.Default.FileExists(toolPath)))
873
if (toolPath == null || !
FileSystems
.Default.FileExists(toolPath))
877
if (!
FileSystems
.Default.FileExists(toolPath))
ManifestUtil\TrustInfo.cs (1)
653
if (
FileSystems
.Default.FileExists(path))
ManifestUtil\Util.cs (1)
269
if (!
FileSystems
.Default.DirectoryExists(logPath))
Modifiers.cs (2)
329
if (
FileSystems
.Default.FileExists(unescapedItemSpec))
345
if (
FileSystems
.Default.FileExists(unescapedItemSpec))
Move.cs (6)
206
if (
FileSystems
.Default.DirectoryExists(destinationFile))
212
if (
FileSystems
.Default.DirectoryExists(sourceFile))
222
if (!
FileSystems
.Default.FileExists(sourceFile))
229
if (OverwriteReadOnlyFiles &&
FileSystems
.Default.FileExists(destinationFile))
236
if (!string.IsNullOrEmpty(destinationFolder) && !
FileSystems
.Default.DirectoryExists(destinationFolder))
271
if (
FileSystems
.Default.FileExists(destinationFile))
MSBuild.cs (1)
311
if (
FileSystems
.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
NativeMethods.cs (5)
845
if (!
FileSystems
.Default.FileExists(existingFileName))
850
var targetExists =
FileSystems
.Default.FileExists(newFileName);
1330
if (
FileSystems
.Default.DirectoryExists(s_gacPath))
1462
if (
FileSystems
.Default.DirectoryExists(path))
1479
if (
FileSystems
.Default.FileExists(path))
RedistList.cs (2)
307
if (
FileSystems
.Default.DirectoryExists(redistDirectory))
1091
if (
FileSystems
.Default.FileExists(subsetFilePath))
RemoveDir.cs (1)
64
if (
FileSystems
.Default.DirectoryExists(directory.ItemSpec))
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))
ResourceHandling\MSBuildResXReader.cs (2)
269
byte[] byteArray =
FileSystems
.Default.ReadFileAllBytes(fileName);
278
byte[] byteArray =
FileSystems
.Default.ReadFileAllBytes(fileName);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (5)
456
taskInfo.SourceCode =
FileSystems
.Default.ReadFileAllText(sourceAttribute.Value.Trim());
562
if (
FileSystems
.Default.FileExists(reference))
580
.FirstOrDefault(p =>
FileSystems
.Default.FileExists(Path.Combine(p, assemblyFileName)));
806
if (deleteSourceCodeFile && sourceCodePath is not null &&
FileSystems
.Default.FileExists(sourceCodePath))
812
if (!_compileForOutOfProcess && !string.IsNullOrEmpty(_assemblyPath) &&
FileSystems
.Default.FileExists(_assemblyPath))
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
47
return possibleLocations.Select(possibleLocation => possibleLocation()).FirstOrDefault(
FileSystems
.Default.FileExists);
StateFileBase.cs (3)
45
if (
FileSystems
.Default.FileExists(stateFile))
83
if (!string.IsNullOrEmpty(stateFile) &&
FileSystems
.Default.FileExists(stateFile))
140
if (
FileSystems
.Default.FileExists(stateFile))
TaskFactoryUtilities.cs (8)
157
if (!string.IsNullOrEmpty(assemblyPath) &&
FileSystems
.Default.FileExists(assemblyPath))
183
Assembly assembly = Assembly.Load(
FileSystems
.Default.ReadFileAllBytes(assemblyPath));
207
if (!
FileSystems
.Default.FileExists(manifestPath))
275
if (
FileSystems
.Default.DirectoryExists(processSpecificInlineTaskDir))
297
if (
FileSystems
.Default.FileExists(path))
299
return Assembly.Load(
FileSystems
.Default.ReadFileAllBytes(path));
305
if (
FileSystems
.Default.FileExists(path))
307
return Assembly.Load(
FileSystems
.Default.ReadFileAllBytes(path));
TempFileUtilities.cs (2)
188
ErrorUtilities.VerifyThrow(!
FileSystems
.Default.FileExists(file), "Guid should be unique");
234
if (
FileSystems
.Default.DirectoryExists(Path))
Unzip.cs (1)
109
if (!
FileSystems
.Default.FileExists(sourceFile.ItemSpec))
Microsoft.Build.Tasks.UnitTests (1)
TestAssemblyInfo.cs (1)
122
if (
FileSystems
.Default.FileExists(potentialVersionsPropsPath))