357 references to File
ComSvcConfig (16)
AtomicFile.cs (9)
55this.originalFileExists = File.Exists(this.originalFileName); 112File.Copy(this.originalFileName, this.tempFileName); 144File.Copy(this.originalFileName, this.backupOfOriginalFileName); 148File.Copy(this.tempFileName, this.originalFileName); 154File.Copy(this.originalFileName, this.backupOfOriginalFileName); 176if ((this.backupOfOriginalFileName != null) && File.Exists(this.backupOfOriginalFileName)) 179File.Copy(this.backupOfOriginalFileName, this.originalFileName); 194if ((!string.IsNullOrEmpty(fileName)) && File.Exists(fileName)) 196File.Delete(fileName);
ComplusEndpointConfigContainer.cs (1)
334using (StreamWriter sw = File.CreateText(fileName))
EndpointConfigContainer.cs (1)
758if (!File.Exists(fileName))
SvcFileManager.cs (5)
181if (File.Exists(fileName + ".svc")) 185while (File.Exists(fileName + "." + count.ToString(CultureInfo.InvariantCulture) + ".svc")) 197using (StreamWriter sw = File.CreateText(fileName)) 230if (!File.Exists(fileName)) 238using (StreamReader sr = File.OpenText(fileName))
Microsoft.Activities.Build (4)
Microsoft\Activities\Build\Expressions\ExpressionsBuildExtension.cs (2)
40if (string.Equals(this.buildContext.Language, "VB", StringComparison.OrdinalIgnoreCase) && File.Exists(deferredValidationErrorsFilePath)) 88File.Delete(fileName);
Microsoft\Activities\Build\Validation\DeferredValidationTask.cs (1)
36if (File.Exists(this.DeferredValidationErrorsFilePath))
Microsoft\Activities\Build\Validation\ReportDeferredValidationErrorsTask.cs (1)
36if (File.Exists(this.DeferredValidationErrorsFilePath))
mscorlib (43)
system\bcldebug.cs (1)
364using (TextWriter err = File.AppendText("ConsoleErrors.log"))
system\io\directory.cs (9)
345if (File.InternalExists(name) || (!InternalExists(name, out currentError) && currentError == Win32Native.ERROR_ACCESS_DENIED)) 445lastError = File.FillAttributeInfo(path, ref data, false, true); 478return File.GetCreationTime(path); 485return File.GetCreationTimeUtc(path); 515return File.GetLastWriteTime(path); 522return File.GetLastWriteTimeUtc(path); 552return File.GetLastAccessTime(path); 559return File.GetLastAccessTimeUtc(path); 1334int dataInitialised = File.FillAttributeInfo(fullPath, ref data, false, true);
system\io\fileinfo.cs (9)
232return File.GetAccessControl(FullPath, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group); 239return File.GetAccessControl(FullPath, includeSections); 246File.SetAccessControl(FullPath, fileSecurity); 291destFileName = File.InternalCopy(FullPath, destFileName, false, true); 314destFileName = File.InternalCopy(FullPath, destFileName, overwrite, true); 321return File.Create(FullPath); 362File.Decrypt(FullPath); 370File.Encrypt(FullPath); 498File.Replace(FullPath, destinationFileName, destinationBackupFileName, ignoreMetadataErrors);
system\io\filesysteminfo.cs (4)
192File.SetCreationTimeUtc(FullPath,value); 235File.SetLastAccessTimeUtc(FullPath,value); 278File.SetLastWriteTimeUtc(FullPath,value); 288_dataInitialised = File.FillAttributeInfo(FullPath, ref _data, false, false);
system\io\longpath.cs (6)
318return File.InternalExists(tempPath); 334int dataInitialised = File.FillAttributeInfo(tempPath, ref data, false, false); 354int dataInitialised = File.FillAttributeInfo(tempPath, ref data, false, false); 374int dataInitialised = File.FillAttributeInfo(tempPath, ref data, false, false); 427int dataInitialised = File.FillAttributeInfo(tempPath, ref data, false, true); // return error 700int dataInitialised = File.FillAttributeInfo(longPath, ref data, false, true);
system\reflection\emit\assemblybuilder.cs (3)
1160if (File.UnsafeExists(fullFileName) == false) 1543if (File.Exists(strFullFileName) == false) 2085System.IO.File.Delete(tmpVersionFile);
system\reflection\emit\modulebuilder.cs (1)
1447if (File.UnsafeExists(resourceFileName) == false)
system\resources\filebasedresourcegroveler.cs (3)
89if (defaultResPath == null || !File.Exists(defaultResPath)) 127if (File.Exists(path)) 143if (File.Exists(fileName))
system\resources\resourcemanager.cs (1)
1534!File.InternalExists(fileName))
system\resources\resourcewriter.cs (1)
360File.SetAttributes(tempFile, FileAttributes.Temporary | FileAttributes.NotContentIndexed);
system\security\cryptography\cryptoconfig.cs (1)
918if (!File.Exists(machineConfigFile))
system\security\policy\applicationsecuritymanager.cs (1)
124if (!File.InternalExists(s_machineConfigFile))
system\security\policy\policylevel.cs (2)
825if (!File.InternalExists(m_path)) 1127if (File.InternalExists(path)) {
system\security\securitymanager.cs (1)
177if (!File.InternalExists(path))
PresentationBuildTasks (19)
BuildTasks\Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (1)
172File.Delete(tempProj);
BuildTasks\Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
316if (!File.Exists(TaskHelper.CreateFullFilePath(strFileName, SourceDir)))
BuildTasks\Microsoft\Build\Tasks\Windows\UidManager.cs (6)
263using (Stream source = File.OpenRead(inputFile.ItemSpec)) 317using (Stream source = File.OpenRead(inputFile.ItemSpec)) 386File.Move(src, dest); 391if (File.Exists(fileName)) 393File.Delete(fileName); 499using (Stream xamlStream = File.OpenRead(fileName))
BuildTasks\MS\Internal\Shared\SourceFileInfo.cs (1)
124_stream = File.OpenRead(_filePath);
BuildTasks\MS\Internal\Tasks\CompilerState.cs (1)
172stream = File.OpenRead(_stateFilePath);
BuildTasks\MS\Internal\Tasks\TaskFileService.cs (6)
157fileStream = File.OpenRead(srcFile); 206using (Stream fileStream = File.OpenRead(fileName)) 234lastChangeDT = File.GetLastWriteTime(srcFile); 259fileExists = File.Exists(fileName); 281File.Delete(fileName); 363File.Copy(buildFile, intelFile, /*overwrite*/ true);
Framework\System\Windows\Markup\XamlTypeMapper.cs (1)
496if (!String.IsNullOrEmpty(assemblyFullPath) && File.Exists(assemblyFullPath))
Framework\System\Windows\Markup\XmlnsCache.cs (1)
128if (!String.IsNullOrEmpty(assemblyFullPath) && File.Exists(assemblyFullPath))
Shared\System\Windows\Markup\ReflectionHelper.cs (1)
650using (FileStream fileStream = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.Read))
PresentationCore (3)
Core\CSharp\MS\Internal\AppModel\SiteOfOriginPart.cs (1)
182return File.OpenRead(_absoluteLocation.LocalPath);
Core\CSharp\MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
80_tempFileStream = File.Open(tempFileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
Core\CSharp\System\Windows\Input\Cursor.cs (1)
306File.Delete(filePath);
PresentationFramework (8)
src\Framework\Microsoft\Win32\FileDialog.cs (2)
1240fileExists = File.Exists(tempPath); 1662if (!GetOption(NativeMethods.OFN_FILEMUSTEXIST) || File.Exists(s.ToString()))
src\Framework\Microsoft\Win32\SaveFileDialog.cs (1)
279fExist = File.Exists(Path.GetFullPath(fileName));
src\Framework\MS\Internal\AppModel\ContentFilePart.cs (1)
171s = System.IO.File.Open(filename, FileMode.Open, FileAccess.Read, ResourceContainer.FileShare);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (1)
12451_writer = new BinaryWriter(File.Open(filename, FileMode.Create));
src\Framework\System\Windows\Documents\Speller.cs (1)
1708System.IO.File.Delete(tempLocationUri.LocalPath);
src\Framework\System\Windows\Documents\WinRTSpellerInterop.cs (1)
507if (!File.Exists(lexiconFilePath))
src\Framework\System\Windows\Standard\Verify.cs (1)
282if (!File.Exists(filePath))
SMSvcHost (1)
System\ServiceModel\Activation\SMSvcHost.cs (1)
49isWebhostSupported = File.Exists(ListenerAdapterNativeLibrary);
System (29)
compmod\microsoft\csharp\csharpcodeprovider.cs (8)
3449File.Delete(options.OutputAssembly); 3461assemblyBuff = File.ReadAllBytes(options.OutputAssembly); 3482if (File.Exists(symbFileName)) 3483symbolsBuff = File.ReadAllBytes(symbFileName); 3511using(FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read, share)) 3596using (Stream str = File.OpenRead(fileName)) { } 3629if (File.Exists(fullname)) { 3678using (Stream str = File.OpenRead(fileName)) { }
compmod\microsoft\visualbasic\VBCodeProvider.cs (2)
2905File.Delete(outputAssemblyFile); 2947using(FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read, share))
compmod\system\codedom\compiler\CodeCompiler.cs (4)
108using (Stream str = File.OpenRead(fileName)) { } 159if (File.Exists(fullname)) { 206using (Stream str = File.OpenRead(fileName)) { } 398File.Delete(options.OutputAssembly);
compmod\system\codedom\compiler\TempFiles.cs (1)
309File.Delete(fileName);
compmod\system\componentmodel\LicFileLicenseProvider.cs (1)
81if (File.Exists(licenseFile)) {
net\System\Net\Cache\IERequestCache.cs (2)
1009File.Delete(m_Entry.Filename); 1061File.Delete(m_Entry.Filename);
net\System\Net\Configuration\UriSectionReader.cs (1)
63if (File.Exists(configFilePath))
net\System\Net\mail\SmtpClient.cs (1)
403if (!File.Exists(pathAndFilename))
net\System\Net\webclient.cs (1)
416File.Delete(fileName);
parent\parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (1)
435if (!File.Exists(zlibDllPath))
security\system\security\cryptography\cryptoapi.cs (1)
3620pbData = File.ReadAllBytes((string)pvObject);
services\monitoring\system\diagnosticts\EventLog.cs (1)
649File.Delete(filename);
services\monitoring\system\diagnosticts\FileVersionInfo.cs (1)
432if (!File.Exists(fileName)) {
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (2)
586File.Delete(IniFilePath); 592File.Delete(SymbolFilePath);
sys\system\configuration\LocalFileSettingsProvider.cs (1)
354if (File.Exists(file)) {
sys\system\configuration\NameValueFileSectionHandler.cs (1)
48if (File.Exists(sourceFileFullPath)) {
System.Activities (2)
System\Activities\Debugger\DebugManager.cs (1)
289File.Delete(temporaryFile);
System\Activities\XamlIntegration\TextExpressionCompilerHelper.cs (1)
28if (!File.Exists(sourceXamlFileName))
System.Activities.Presentation (2)
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxItemLoader.cs (1)
59using (StreamReader reader = File.OpenText(fileName))
System.Activities.Presentation\System\Activities\Presentation\View\AssemblyContextControlItem.cs (1)
44if ((LocalAssemblyName != null) && LocalAssemblyName.CodeBase != null && (File.Exists(new Uri(LocalAssemblyName.CodeBase).LocalPath)))
System.AddIn (22)
System\Addin\Hosting\AddInProcess.cs (1)
118if(!File.Exists(_pathToAddInProcess))
System\Addin\Hosting\AddInStore.cs (14)
98if (!File.Exists(deploymentStore) || PipelineStoreIsOutOfDate(deploymentStore, pipelineRootFolderPath)) { 210if (!consistent && File.Exists(addInStore)) { 212File.Delete(addInStore); 248if (!File.Exists(addInStore) || AddInStoreIsOutOfDate(addInsPath)) { 261DateTime storeTime = File.GetLastWriteTime(deploymentStore); 304DateTime storeTime = File.GetLastWriteTime(storeName); 406if (!consistent && File.Exists(deploymentStore)) { 408File.Delete(deploymentStore); 773DateTime lastWriteTime = File.GetCreationTime(fileName); 781DateTime timeStamp = File.GetCreationTime(fileName); 1038using (FileStream s = File.Create(cacheFileName)) { 1046File.SetCreationTime(cacheFileName, timeStamp); 1078if (!File.Exists(storeFileName)) 1088using (Stream s = File.OpenRead(storeFileName))
System\Addin\Hosting\AddInToken.cs (1)
355if (File.Exists(Path.Combine(location, fileName)))
System\Addin\Hosting\InspectionWorker.cs (2)
133if (File.Exists(dllName)) 135else if (File.Exists(simpleFileName + ".exe"))
System\Addin\Hosting\Utils.cs (2)
229if (File.Exists(dllName)) 231else if (File.Exists(simpleFileName + ".exe"))
System\Addin\MiniReflection\MiniAssembly.cs (2)
203if (File.Exists(fileName)) 207if (File.Exists(fileName))
System.Configuration (17)
System\Configuration\AppSettingsSection.cs (1)
123if (System.IO.File.Exists(sourceFileFullPath)) {
System\Configuration\ConfigurationFileMap.cs (1)
32if (!File.Exists(machineConfigFilename))
System\Configuration\Internal\InternalConfigHost.cs (2)
238if (File.Exists(streamName)) { 318File.Delete(streamName);
System\Configuration\Internal\WriteFileContext.cs (11)
72if ( File.Exists( filename ) ) { 110attributes = File.GetAttributes( source ); 111File.SetAttributes( destination, attributes ); 114creationTime = File.GetCreationTimeUtc( source ); 115File.SetCreationTimeUtc( destination, creationTime ); 133fileSecurity = File.GetAccessControl( source, AccessControlSections.Access ); 137File.SetAccessControl( destination, fileSecurity ); 142fileAttributes = File.GetAttributes( source ); 143File.SetAttributes( destination, fileAttributes ); 209File.Exists( Target ) && 251File.Copy(Source, Target, true);
System\Configuration\RSAProtectedConfigurationProvider.cs (2)
114rsa.FromXmlString(File.ReadAllText(xmlFileName)); 123File.WriteAllText(xmlFileName, xmlString);
System.Core (2)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (2)
147bool existed = File.Exists(path); 805File.Delete(path);
System.Data (2)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxItemLoader.cs (1)
59using (StreamReader reader = File.OpenText(fileName))
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\AssemblyContextControlItem.cs (1)
44if ((LocalAssemblyName != null) && LocalAssemblyName.CodeBase != null && (File.Exists(new Uri(LocalAssemblyName.CodeBase).LocalPath)))
System.Data.Entity (1)
System\Data\Metadata\MetadataArtifactLoader.cs (1)
104else if (File.Exists(normalizedPath))
System.Data.Entity.Design (4)
System\Data\Entity\Design\EntityCodeGenerator.cs (4)
250if (!File.Exists(sourceEdmSchemaFilePath)) 423textWriter.GetOrCreateTextWriter().Write(File.ReadAllText(target)); 430if (cleanUpTarget && target != null && File.Exists(target)) 432File.Delete(target);
System.Data.Linq (4)
SqlClient\SqlProvider.cs (4)
543if (!File.Exists(this.dbName)) { 583if (File.Exists(this.dbName)) { 711File.Delete(this.dbName); 754exists = File.Exists(this.dbName);
System.Data.Services.Design (2)
System\Data\EntityModel\DataServiceBuildProvider.cs (2)
356return IO.File.ReadAllText(edmxFilePath); 364using (System.IO.TextReader mapFileReader = IO.File.OpenText(this.dataSvcMapFilePath))
System.Drawing (6)
commonui\System\Drawing\BitmapSelector.cs (1)
75return File.Exists(newPath) ? newPath : originalPath;
commonui\System\Drawing\Icon.cs (1)
262if (!File.Exists(filePath)) {
commonui\System\Drawing\Image.cs (3)
167if (!File.Exists(filename)) { 428created = dataStream = File.OpenRead(filename); 620using (FileStream fs = File.OpenWrite(filename)) {
commonui\System\Drawing\ToolboxBitmapAttribute.cs (1)
323FileStream reader = System.IO.File.Open(imageFile, FileMode.Open);
System.IdentityModel.Selectors (3)
infocard\client\System\IdentityModel\Selectors\CardSpaceShim.cs (3)
251if (!IsSafeFile(v2AndAboveImplementationDll) || !File.Exists(v2RegPath)) 290if (!File.Exists(implDllFullPath)) 299if (!File.Exists(implDllFullPath))
System.IO.Log (1)
System\IO\Log\SimpleFileLog.cs (1)
24if (File.Exists(absolutePath))
System.Management (1)
Instrumentation\SchemaRegistration.cs (1)
224if(File.Exists(PrecompiledAssemblyPath))
System.Runtime.Caching (1)
System\Caching\FileChangeNotificationSystem.cs (1)
116lastWriteTime = File.GetLastWriteTime(filePath);
System.Runtime.Remoting (9)
channels\http\httpremotinghandler.cs (3)
108if (File.Exists(filename)) 255if (File.Exists(context.Request.PhysicalPath)) 400bool bFileExists = File.Exists(httpRequest.PhysicalPath);
metadata\metadata.cs (6)
42ConvertTypesToSchemaToStream(types, sdlType, File.Create(path)); 63ConvertTypesToSchemaToStream(types, sdlType, File.Create(path)); 100RetrieveSchemaFromUrlToStream(url, File.Create(path)); 183inputStream = File.OpenRead(filename); 227File.Delete(stfilename); 267Stream outputStream = File.Create(path);
System.ServiceModel (4)
System\ServiceModel\ComIntegration\ComIntegrationManifestGenerator.cs (4)
34s = File.Create(strAssemblyManifestFileName); 68File.Delete(strAssemblyManifestFileName); 92s = File.Create(strAssemblyManifestFileName); 111File.Delete(strAssemblyManifestFileName);
System.ServiceModel.Activation (1)
System\ServiceModel\Activities\Activation\XamlBuildProviderExtension.cs (1)
235foreach (string line in File.ReadLines(name))
System.Web (82)
Compilation\AssemblyBuilder.cs (5)
365return File.OpenWrite(resourceFile); 650if (!File.Exists(physicalPath)) 693if (File.Exists(compilParams.OutputAssembly)) 1101if (File.Exists(physicalPath)) { 1270File.Delete(fileData.FullName);
Compilation\BaseCodeDomTreeGenerator.cs (1)
898if (!File.Exists(pragmaFile)) {
Compilation\BuildManager.cs (13)
527if (File.Exists(licAssemblyPath)) { 690Debug.Assert(File.Exists(_webHashFilePath), _webHashFilePath); 822return new HashSet<string>(File.ReadAllLines(path), StringComparer.OrdinalIgnoreCase); 827File.Delete(path); 844File.WriteAllLines(path, assemblies); 848File.Delete(path); 2648if (!File.Exists(precompMarkerFile)) 2980File.Copy(sourcePhysicalPath, destPhysicalPath, true /*overwrite*/); 2997if (File.Exists(destPhysicalPath)) { 3025File.Copy(sourcePhysicalPath, destPhysicalPath, false /*overwrite*/); 3388return File.Create(path); 3400if (!File.Exists(path)) 3403return File.OpenRead(path);
Compilation\BuildResult.cs (3)
1262using (FileStream stream = File.Open(_ccuPreservationFileName, FileMode.Open)) { 1283using (FileStream stream = File.Open(preservationFileName, FileMode.Create)) { 1310File.Delete(ccuPreservationFileName);
Compilation\BuildResultCache.cs (5)
373if (File.Exists(pdbPath)) { 650File.Delete(baseName); 668return File.Exists(s + dotDelete); 675if (!File.Exists(newName)) { 874File.Delete(fileData.FullName);
Compilation\MultiTargetingUtil.cs (1)
276return System.IO.File.Exists(path);
Compilation\PreservationFileReader.cs (1)
156File.Delete(preservationFile);
Compilation\PreservationFileWriter.cs (1)
83File.Delete(preservationFile);
Compilation\TimeStampChecker.cs (2)
42DateTime lastWriteTimeUtc = File.GetLastWriteTimeUtc(path); 83DateTime lastWriteTimeUtc = File.GetLastWriteTimeUtc(path);
Configuration\BrowserCapabilitiesCodeGenerator.cs (5)
206if (File.Exists(_publicKeyTokenFile)) { 207File.Delete(_publicKeyTokenFile); 821if (File.Exists(strongNameFile)) { 822File.Delete(strongNameFile); 858if (!File.Exists(filename)) {
Configuration\RemoteWebConfigurationHostServer.cs (16)
48if (File.Exists(fileName)) { 53buf = File.ReadAllBytes(fileName); 55DateTime lastWrite = File.GetLastWriteTimeUtc(fileName); 69bool fileExists = File.Exists(fileName); 80if (fileExists && File.GetLastWriteTimeUtc(fileName).Ticks > readTime) { 98for (int iter = 0; File.Exists(tempFile); iter++) { // if it exists, then use a different random name 118File.Delete(tempFile); 137File.Delete(tempFile); 151lastWriteTicks = File.GetLastWriteTimeUtc(fileName).Ticks; 275attributes = File.GetAttributes(oldFileName); 276File.SetAttributes(newFileName, attributes); 279creationTime = File.GetCreationTimeUtc(oldFileName); 280File.SetCreationTimeUtc(newFileName, creationTime); 293fileSecurity = File.GetAccessControl(oldFileName, 300fileSecurity = File.GetAccessControl(oldFileName, 306File.SetAccessControl(newFileName, fileSecurity);
DataAccess\SqlConnectionHelper.cs (7)
181if (File.Exists(fullFileName)) 193if (!File.Exists(fullFileName)) 233File.Move(tempFileName, fullFileName); 236if (!File.Exists(fullFileName)) { 237File.Copy(tempFileName, fullFileName); 239File.Delete(tempFileName); 245File.Delete(tempFileName.Replace("_TMP.MDF", "_TMP_log.LDF"));
Handlers\AssemblyResourceLoader.cs (2)
152long assemblyDate = File.GetLastWriteTime(new Uri(assemblyName.CodeBase).LocalPath).Ticks; 167if (File.Exists(resourcePhysicalPath)) {
Hosting\HostingEnvironment.cs (1)
322Debug.Assert(File.Exists(rootWebConfigPath), "File.Exists(rootWebConfigPath)");
Hosting\MapPathBasedVirtualPathProvider.cs (1)
95bool exists = (isFile) ? File.Exists(physicalPath) : Directory.Exists(physicalPath);
Hosting\ProcessHost.cs (2)
1199if (!File.Exists(customLoaderAssemblyPhysicalPath)) { 1210bool webConfigFileExists = File.Exists(webConfigPhysicalPath);
HttpRuntime.cs (1)
1251if (File.Exists(appOfflineFile)) {
Management\regiisutil.cs (2)
119File.Delete(System.IO.Path.Combine(binaryDirectory, "AspNetMMCExt.tlb")); 377if (!System.IO.File.Exists(fileName))
Management\SqlServices.cs (3)
197string content = File.ReadAllText(fullpath); 393string content = File.ReadAllText(fullpath); 540content = File.ReadAllText(fullpath);
UI\Util.cs (7)
219Debug.Assert(File.Exists(path), path); 221File.Delete(path); 227if (File.Exists(path)) 314File.Delete(dummyFile); 401if (!File.Exists(path)) return null; 455FileAttributes attribs = File.GetAttributes(path); 457File.SetAttributes(path, attribs & ~FileAttributes.ReadOnly);
Util\FileUtil.cs (1)
78exists = File.Exists(filename);
Util\HashCodeCombiner.cs (1)
139byte[] fileContentBytes = File.ReadAllBytes(fileName);
Util\SmtpMail.cs (1)
613File.Open(_filename, FileMode.Open, FileAccess.Read, FileShare.Read).Close();
System.Web.DataVisualization (10)
WebForm\ChartWebControl.cs (3)
889if (File.Exists(fileName)) 891DateTime fileTime = File.GetLastWriteTime(fileName); 3218File.Delete(_designTimeChart);
WebForm\General\ChartHttpHandler.cs (7)
1239using (FileStream fileStream = File.Create(testFileName)) { } 1240File.Delete(testFileName); 1529using (FileStream stream = File.Create(settings.Directory + key)) 1601if (File.Exists(settings.Directory + key)) 1603using (FileStream fileStream = File.OpenRead(settings.Directory + key)) 1690File.Delete(settings.Directory + key); 1721return File.Exists(settings.Directory + key);
System.Web.Entity.Design (1)
parent\parent\parent\parent\InternalApis\NDP_FX\inc\BitmapSelector.cs (1)
75return File.Exists(newPath) ? newPath : originalPath;
System.Web.Extensions (12)
ClientServices\ConnectivityStatus.cs (3)
38_IsOffline = File.Exists(path); 48File.Delete(path); 50using (FileStream fs = File.Create(path)) {
ClientServices\Providers\ClientData.cs (1)
227if (File.Exists(fileName)) {
ClientServices\Providers\SqlHelper.cs (1)
209bool needToCreateDB = (File.Exists(fileName) == false);
Compilation\WCFModel\DataSvcMapFileLoader.cs (3)
86return File.OpenText(_mapFilePath); 91return File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(_mapFilePath), name)); 96return File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(_mapFilePath), name));
Compilation\WCFModel\SvcMapFileLoader.cs (3)
86return File.OpenText(_mapFilePath); 91return File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(_mapFilePath), name)); 96return File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(_mapFilePath), name));
Script\Services\WebServiceClientProxyGenerator.cs (1)
27DateTime writeTime = File.GetLastWriteTime(new Uri(assemblyName.CodeBase).LocalPath);
System.Web.Mobile (9)
UI\MobileControls\Design\Util\TemporaryBitmapFile.cs (8)
49FileAttributes fa = File.GetAttributes(_path); 50File.SetAttributes(_path, fa & ~FileAttributes.ReadOnly); 51File.Delete(_path); 60if(File.Exists(_path)) 62fa = File.GetAttributes(_path); 63File.SetAttributes(_path, fa & ~FileAttributes.ReadOnly); 69fa = File.GetAttributes(_path); 70File.SetAttributes(_path, fa | FileAttributes.ReadOnly);
UI\MobileControls\Design\Util\WebConfigManager.cs (1)
102if(!File.Exists(_path))
System.Web.Services (5)
System\Web\Services\Discovery\DiscoveryClientProtocol.cs (4)
337Stream file = File.OpenRead(topLevelFilename); 359Stream docFile = File.OpenRead(Path.Combine(topLevelPath, results.Results[i].Filename)); 499Stream file = File.Create(filename); 510Stream topLevelFile = File.Create(topLevelFullPath);
System\Web\Services\Discovery\DiscoveryRequestHandler.cs (1)
50if (File.Exists(physicalPath)) {
System.Windows.Forms (7)
parent\parent\parent\InternalApis\NDP_FX\inc\BitmapSelector.cs (1)
75return File.Exists(newPath) ? newPath : originalPath;
winforms\Managed\System\WinForms\FileDialog.cs (1)
691fileExists = File.Exists(fileName);
winforms\Managed\System\WinForms\Help.cs (2)
354if (!File.Exists(localPath)) { 388if (!File.Exists(localPath)) {
winforms\Managed\System\WinForms\PropertyGrid.cs (2)
5363Debug.Assert(File.Exists(fullFileName), "Automation log file does not exist"); 5365if (File.Exists(fullFileName))
winforms\Managed\System\WinForms\RichTextBox.cs (1)
2769Stream file = File.Create(path);
System.Workflow.Activities (1)
Designers\StateDesigner.cs (1)
2746if (File.Exists(imageFilePath))
System.Workflow.ComponentModel (14)
AuthoringOM\Compiler\CompileXomlTask.cs (2)
1353if (File.Exists(tempFile)) 1355FileStream fileStream = File.Open(tempFile, FileMode.Truncate);
AuthoringOM\Compiler\TypeSystem\AssemblyLoader.cs (1)
20if (File.Exists(filePath))
AuthoringOM\Compiler\TypeSystem\TypeProvider.cs (1)
94if (File.Exists(path) &&
AuthoringOM\Compiler\XomlCompiler.cs (4)
542results.CompiledAssembly = Assembly.Load(File.ReadAllBytes(results.PathToAssembly)); 567File.Delete(outputAssembly); 572File.Delete(createdTempFileName); 783System.IO.File.Delete(file);
AuthoringOM\Design\DesignerHelpers.cs (1)
1477if (File.Exists(imageFilePath))
AuthoringOM\Design\Themes.cs (3)
329for (int i = 1; File.Exists(tempThemePath); i++) 354if (File.Exists(themePath)) 469if (themeFilePath != null && File.Exists(themeFilePath))
AuthoringOM\Design\XomlDesignerLoader.cs (2)
239if (File.Exists(layoutFileName)) 469if (rootDesigner == null || !rootDesigner.SupportsLayoutPersistence || !File.Exists(layoutFileName))
WindowsBase (2)
Base\MS\Internal\Verify.cs (1)
121if (!File.Exists(filePath))
parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (1)
435if (!File.Exists(zlibDllPath))
WsatUI (3)
Configuration\ETWWsatTraceSession.cs (3)
193if (!File.Exists(logFileName)) 212if (!File.Exists(backupFile2)) 216File.Move(logFileName, backupFile2);
XamlBuildTask (4)
Microsoft\Build\Tasks\Xaml\GenerateTemporaryAssemblyTask.cs (1)
123File.Delete(filename);
Microsoft\Build\Tasks\Xaml\PartialClassGenerationTask.cs (2)
306DateTime timeStamp = File.GetLastWriteTimeUtc(fullPath); 327DateTime timeStamp = File.GetLastWriteTimeUtc(fullPath);
Microsoft\Build\Tasks\Xaml\PartialClassGenerationTaskInternal.cs (1)
486using (XmlWriter xmlWriter = XmlWriter.Create(File.Open(markupFileName, FileMode.Create), xmlSettings))