518 references to FileAccess
Microsoft.Activities.Build (1)
Microsoft\Activities\Build\Validation\ValidationBuildExtension.cs (1)
66using (FileStream stream = new FileStream(filePath, FileMode.Create, FileAccess.Write))
mscorlib (118)
system\activationcontext.cs (1)
445using (FileStream fs = new FileStream(manifestPath, FileMode.Open, FileAccess.Read))
system\console.cs (4)
479private static Stream GetStandardFile(int stdHandleName, FileAccess access, int bufferSize) { 1854FileAccess.Write, bufferSize); 1875FileAccess.Read, bufferSize); 1896FileAccess.Write, bufferSize);
system\io\__consolestream.cs (5)
50internal __ConsoleStream(SafeFileHandle handle, FileAccess access, bool useFileAPIs) 54_canRead = ( (access & FileAccess.Read) == FileAccess.Read ); 55_canWrite = ( (access & FileAccess.Write) == FileAccess.Write);
system\io\file.cs (14)
221return new FileStream(path, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize); 227return new FileStream(path, FileMode.Create, FileAccess.ReadWrite, 468return Open(path, mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.None); 473public static FileStream Open(String path, FileMode mode, FileAccess access) { 479public static FileStream Open(String path, FileMode mode, FileAccess access, FileShare share) { 496using(OpenFile(path, FileAccess.Write, out handle)) { 560using(OpenFile(path, FileAccess.Write, out handle)) { 624using(OpenFile(path, FileAccess.Write, out handle)) { 769return new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); 777FileAccess.Write, FileShare.None); 917using(FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 978using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, 1455private static FileStream OpenFile(String path, FileAccess access, out SafeFileHandle handle)
system\io\fileinfo.cs (5)
406return Open(mode, FileAccess.ReadWrite, FileShare.None); 411public FileStream Open(FileMode mode, FileAccess access) { 417public FileStream Open(FileMode mode, FileAccess access, FileShare share) { 429return new FileStream(FullPath, FileMode.Open, FileAccess.Read, 438FileAccess.Write, FileShare.None);
system\io\filestream.cs (34)
512: this(path, mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.Read, DefaultBufferSize, FileOptions.None, Path.GetFileName(path), false) { 518public FileStream(String path, FileMode mode, FileAccess access) 525public FileStream(String path, FileMode mode, FileAccess access, FileShare share) 532public FileStream(String path, FileMode mode, FileAccess access, FileShare share, int bufferSize) 541public FileStream(String path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options) 553public FileStream(String path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync) 569Init(path, mode, (FileAccess)0, (int)rights, true, share, bufferSize, options, secAttrs, Path.GetFileName(path), false, false, false); 585Init(path, mode, (FileAccess)0, (int)rights, true, share, bufferSize, options, secAttrs, Path.GetFileName(path), false, false, false); 592internal FileStream(String path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, String msgPath, bool bFromProxy) 601internal FileStream(String path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, String msgPath, bool bFromProxy, bool useLongPath) 610internal FileStream(String path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, String msgPath, bool bFromProxy, bool useLongPath, bool checkHost) 620private void Init(String path, FileMode mode, FileAccess access, int rights, bool useRights, FileShare share, int bufferSize, FileOptions options, Win32Native.SECURITY_ATTRIBUTES secAttrs, String msgPath, bool bFromProxy, bool useLongPath, bool checkHost) 646else if (!useRights && (access < FileAccess.Read || access > FileAccess.ReadWrite)) 667if ((!useRights && (access & FileAccess.Write) == 0) 690access = FileAccess.Write; 700fAccess = access == FileAccess.Read? GENERIC_READ: 701access == FileAccess.Write? GENERIC_WRITE: 734if ((!useRights && (access & FileAccess.Read) != 0) || (useRights && (fileSystemRights & FileSystemRights.ReadAndExecute) != 0)) 776if ((!useRights && (access & FileAccess.Write) != 0) 928_canRead = (access & FileAccess.Read) != 0; 929_canWrite = (access & FileAccess.Write) != 0; 959public FileStream(IntPtr handle, FileAccess access) 966public FileStream(IntPtr handle, FileAccess access, bool ownsHandle) 973public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize) 985public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync) 992public FileStream(SafeFileHandle handle, FileAccess access) 999public FileStream(SafeFileHandle handle, FileAccess access, int bufferSize) 1009public FileStream(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync) { 1019if (access < FileAccess.Read || access > FileAccess.ReadWrite) 1027_canRead = 0 != (access & FileAccess.Read); 1028_canWrite = 0 != (access & FileAccess.Write);
system\io\isolatedstorage\isolatedstoragefile.cs (3)
1265public IsolatedStorageFileStream OpenFile(string path, FileMode mode, FileAccess access) { 1270public IsolatedStorageFileStream OpenFile(string path, FileMode mode, FileAccess access, FileShare share) { 1276return new IsolatedStorageFileStream(path, FileMode.Create, FileAccess.ReadWrite, FileShare.None, this);
system\io\isolatedstorage\isolatedstoragefilestream.cs (12)
56: this(path, mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.None, null) { 63: this(path, mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.None, isf) 71FileAccess access) 72: this(path, mode, access, access == FileAccess.Read? 80FileAccess access, IsolatedStorageFile isf) 81: this(path, mode, access, access == FileAccess.Read? 89FileAccess access, FileShare share) 97FileAccess access, FileShare share, IsolatedStorageFile isf) 105FileAccess access, FileShare share, int bufferSize) 116FileAccess access, FileShare share, int bufferSize,
system\io\pinnedbuffermemorystream.cs (1)
49Initialize(ptr, len, len, FileAccess.Read, true);
system\io\streamreader.cs (1)
240Stream stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultFileStreamBufferSize, FileOptions.SequentialScan, Path.GetFileName(path), false, false, checkHost);
system\io\streamwriter.cs (1)
226FileStream f = new FileStream(path, mode, FileAccess.Write, FileShare.Read,
system\io\unmanagedmemoryaccessor.cs (8)
40private FileAccess _access; 55Initialize(buffer, offset, capacity, FileAccess.Read); 59public UnmanagedMemoryAccessor(SafeBuffer buffer, Int64 offset, Int64 capacity, FileAccess access) { 65protected void Initialize(SafeBuffer buffer, Int64 offset, Int64 capacity, FileAccess access) { 78if (access < FileAccess.Read || access > FileAccess.ReadWrite) { 108_canRead = (_access & FileAccess.Read) != 0; 109_canWrite = (_access & FileAccess.Write) != 0;
system\io\unmanagedmemorystream.cs (17)
103private FileAccess _access; 123Initialize(buffer, offset, length, FileAccess.Read, false); 127public UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length, FileAccess access) { 135internal UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length, FileAccess access, bool skipSecurityCheck) { 140protected void Initialize(SafeBuffer buffer, long offset, long length, FileAccess access) { 145internal void Initialize(SafeBuffer buffer, long offset, long length, FileAccess access, bool skipSecurityCheck) { 158if (access < FileAccess.Read || access > FileAccess.ReadWrite) { 201Initialize(pointer, length, length, FileAccess.Read, false); 206public unsafe UnmanagedMemoryStream(byte* pointer, long length, long capacity, FileAccess access) 215internal unsafe UnmanagedMemoryStream(byte* pointer, long length, long capacity, FileAccess access, bool skipSecurityCheck) 222protected unsafe void Initialize(byte* pointer, long length, long capacity, FileAccess access) 228internal unsafe void Initialize(byte* pointer, long length, long capacity, FileAccess access, bool skipSecurityCheck) 240if (access < FileAccess.Read || access > FileAccess.ReadWrite) 260get { return _isOpen && (_access & FileAccess.Read) != 0; } 270get { return _isOpen && (_access & FileAccess.Write) != 0; }
system\reflection\assembly.cs (3)
2268FileAccess.Read, FileShare.Read, FileStream.DefaultBufferSize, false); 2287FileAccess.Read, FileShare.Read, FileStream.DefaultBufferSize, false); 2538return new UnmanagedMemoryStream(pbInMemoryResource, (long)length, (long)length, FileAccess.Read, true);
system\resources\resourcereader.cs (2)
167_store = new BinaryReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultFileStreamBufferSize, FileOptions.RandomAccess, Path.GetFileName(fileName), false), Encoding.UTF8); 782return new UnmanagedMemoryStream(_ums.PositionPointer, len, len, FileAccess.Read, true);
system\resources\resourcewriter.cs (2)
109_output = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None); 363dataSection = new FileStream(tempFile, FileMode.Open, FileAccess.ReadWrite, FileShare.Read,
system\resources\runtimeresourceset.cs (1)
196Stream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
system\security\permissions\permissionattributes.cs (1)
1198return BruteForceParseStream( new FileStream( m_file, FileMode.Open, FileAccess.Read) );
system\security\policy\applicationsecuritymanager.cs (1)
129using (FileStream contents = new FileStream(s_machineConfigFile, FileMode.Open, FileAccess.Read))
system\security\policy\policylevel.cs (1)
808using (FileStream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {
system\security\securitymanager.cs (1)
187using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read)) {
PresentationBuildTasks (3)
BuildTasks\Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
64_sourceStream = new FileStream(_sourcePath, FileMode.Open, FileAccess.Read, FileShare.Read);
BuildTasks\Ms\Internal\MarkupCompiler\MarkupCompiler.cs (1)
1301using (FileStream bamlFileStream = new FileStream(filepath, FileMode.Create, FileAccess.Write))
Shared\System\Windows\Markup\ReflectionHelper.cs (1)
650using (FileStream fileStream = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.Read))
PresentationCore (12)
Core\CSharp\MS\Internal\AppModel\SiteOfOriginContainer.cs (1)
145internal SiteOfOriginContainer() : base(FileAccess.Read)
Core\CSharp\MS\Internal\AppModel\SiteOfOriginPart.cs (1)
57protected override Stream GetStreamCore(FileMode mode, FileAccess access)
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (1)
1088Initialize((byte*)_viewHandle.Memory, size, size, FileAccess.Read);
Core\CSharp\MS\Internal\FontCache\FontSource.cs (1)
451 FileAccess.Read
Core\CSharp\MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
80_tempFileStream = File.Open(tempFileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
Core\CSharp\System\IO\Packaging\PackWebResponse.cs (2)
278Stream s = p.GetStream(FileMode.Open, FileAccess.Read); 684Stream s = p.GetStream(FileMode.Open, FileAccess.Read);
Core\CSharp\System\Windows\Input\Cursor.cs (1)
269using (FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Write, FileShare.None))
Core\CSharp\System\Windows\Media\Imaging\BitmapDecoder.cs (3)
1208bitmapStream = new System.IO.FileStream(uri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.Read); 1239bitmapStream = new System.IO.FileStream(uri.OriginalString, FileMode.Open, FileAccess.Read, FileShare.Read); 1472bitmapStream = new System.IO.FileStream(uri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.Read);
Core\CSharp\System\Windows\Media\Imaging\BitmapDownload.cs (1)
177entry.outputStream = new FileStream(fileHandle, FileAccess.ReadWrite);
PresentationFramework (25)
src\Framework\Microsoft\Win32\OpenFileDialog.cs (2)
114fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); 171fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
src\Framework\Microsoft\Win32\SaveFileDialog.cs (1)
110return new FileStream(filename, FileMode.Create, FileAccess.ReadWrite);
src\Framework\MS\Internal\AppModel\ContentFilePart.cs (2)
75protected override Stream GetStreamCore(FileMode mode, FileAccess access) 171s = System.IO.File.Open(filename, FileMode.Open, FileAccess.Read, ResourceContainer.FileShare);
src\Framework\MS\Internal\AppModel\ResourceContainer.cs (1)
103internal ResourceContainer() : base(FileAccess.Read)
src\Framework\MS\Internal\AppModel\ResourcePart.cs (1)
87protected override Stream GetStreamCore(FileMode mode, FileAccess access)
src\Framework\MS\Internal\IO\Packaging\ByteStream.cs (7)
51internal ByteStream(object underlyingStream, FileAccess openAccess) 60Debug.Assert(_access == FileAccess.Read); 80(FileAccess.Read == (_access & FileAccess.Read) || 81FileAccess.ReadWrite == (_access & FileAccess.ReadWrite))); 435FileAccess _access;
src\Framework\MS\Internal\IO\Packaging\XpsFilter.cs (3)
370FileAccess fileAccess; 395fileAccess = FileAccess.Read; 665FileAccess fileAccess,
src\Framework\System\Windows\Documents\Speller.cs (1)
1745using (FileStream outputStream = FileHelper.CreateAndOpenTemporaryFile(out tmpFilePath, FileAccess.ReadWrite))
src\Framework\System\Windows\Documents\WinRTSpellerInterop.cs (2)
520using (FileStream stream = new FileStream(lexiconFilePath, FileMode.Open, FileAccess.Read)) 705using (FileStream sourceStream = new FileStream(sourcePath, FileMode.Open, FileAccess.Read))
src\Framework\System\Windows\Documents\WpfPayload.cs (3)
758_package = Package.Open(stream, FileMode.Create, FileAccess.ReadWrite); 780Package package = Package.Open(stream, FileMode.Create, FileAccess.ReadWrite); 801Package package = Package.Open(stream, FileMode.Open, FileAccess.Read);
src\Framework\System\Windows\Interop\DocobjHost.cs (1)
1403FileStream fileStream = new FileStream(manifestName, FileMode.Open, FileAccess.Read);
src\Framework\System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
53var stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
System (55)
compmod\microsoft\csharp\csharpcodeprovider.cs (6)
674Stream temp = new FileStream(responseFileName, FileMode.Create, FileAccess.Write, FileShare.Read); 3399new FileStream(options.OutputAssembly, FileMode.Create, FileAccess.ReadWrite).Close(); 3464using (FileStream fs = new FileStream(options.OutputAssembly, FileMode.Open, FileAccess.Read, FileShare.Read)) 3511using(FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read, share)) 3737Stream temp = new FileStream(filenames[i], FileMode.Create, FileAccess.Write, FileShare.Read); 3811FileStream fileStream = new FileStream(name, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
compmod\microsoft\visualbasic\VBCodeProvider.cs (3)
2832new FileStream(options.OutputAssembly, FileMode.Create, FileAccess.ReadWrite).Close(); 2909FileStream fs = new FileStream(outputAssemblyFile, FileMode.Open, FileAccess.Read, FileShare.Read); 2947using(FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read, share))
compmod\system\codedom\compiler\CodeCompiler.cs (6)
265Stream temp = new FileStream(filenames[i], FileMode.Create, FileAccess.Write, FileShare.Read); 348new FileStream(options.OutputAssembly, FileMode.Create, FileAccess.ReadWrite).Close(); 376FileAccess.Read, FileShare.ReadWrite); 402FileStream fs = new FileStream(options.OutputAssembly, FileMode.Open, FileAccess.Read, FileShare.Read); 458Stream temp = new FileStream(responseFileName, FileMode.Create, FileAccess.Write, FileShare.Read); 503FileStream fileStream = new FileStream(name, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
compmod\system\codedom\compiler\Executor.cs (1)
57return new FileStream(file, FileMode.CreateNew, FileAccess.Write, FileShare.Read | FileShare.Inheritable);
compmod\system\codedom\compiler\TempFiles.cs (1)
221using (tempFileStream = new FileStream(tempFileName, FileMode.CreateNew, FileAccess.Write)) { }
compmod\system\componentmodel\LicFileLicenseProvider.cs (1)
82Stream licStream = new FileStream(licenseFile, FileMode.Open, FileAccess.Read, FileShare.Read);
net\System\Net\_PooledStream.cs (2)
164m_NetworkStream.InitNetworkStream(socket, FileAccess.ReadWrite); 210m_NetworkStream.InitNetworkStream(socket, FileAccess.ReadWrite);
net\System\Net\Cache\IERequestCache.cs (2)
628: base(entry.Filename, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete, 4096, async) 815base(entry.Filename, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 4096, async) {
net\System\Net\Configuration\UriSectionReader.cs (1)
65using (FileStream configFile = new FileStream(configFilePath, FileMode.Open, FileAccess.Read))
net\System\Net\filewebrequest.cs (7)
29FileAccess m_fileAccess; 55m_fileAccess = FileAccess.Read; 73m_fileAccess = (FileAccess )serializationInfo.GetInt32("fileAccess"); 434request.m_stream = new FileWebStream(request, request.m_uri.LocalPath, FileMode.Create, FileAccess.Write, FileShare.Read); 435request.m_fileAccess = FileAccess.Write; 566public FileWebStream(FileWebRequest request, string path, FileMode mode, FileAccess access, FileShare sharing) 576public FileWebStream(FileWebRequest request, string path, FileMode mode, FileAccess access, FileShare sharing, int length, bool async)
net\System\Net\filewebresponse.cs (5)
24FileAccess m_fileAccess; 31internal FileWebResponse(FileWebRequest request, Uri uri, FileAccess access, bool asyncHint) { 35if (access == FileAccess.Write) { 50FileAccess.Read, 77m_fileAccess = (FileAccess )serializationInfo.GetInt32("fileAccess");
net\System\Net\mail\Attachment.cs (2)
89Stream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read); 106Stream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
net\System\Net\Sockets\NetworkStream.cs (9)
62InitNetworkStream(socket, FileAccess.ReadWrite); 77InitNetworkStream(socket, FileAccess.ReadWrite); 89InitNetworkStream(socket, FileAccess.ReadWrite); 97public NetworkStream(Socket socket, FileAccess access) { 109public NetworkStream(Socket socket, FileAccess access, bool ownsSocket) { 401internal void InitNetworkStream(Socket socket, FileAccess Access) { 418case FileAccess.Read: 421case FileAccess.Write: 424case FileAccess.ReadWrite:
net\System\Net\Sockets\Socket.cs (3)
1437fileStream = new FileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.Read); 3617fileStream = new FileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.Read); 9306new FileStream(spe.m_FilePath,FileMode.Open,FileAccess.Read,FileShare.Read);
net\System\Net\webclient.cs (3)
395fs = new FileStream(fileName, FileMode.Create, FileAccess.Write); 615fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); 2100fs = new FileStream(fileName, FileMode.Create, FileAccess.Write);
services\monitoring\system\diagnosticts\Process.cs (3)
2154standardInput = new StreamWriter(new FileStream(standardInputWritePipeHandle, FileAccess.Write, 4096, false), Console.InputEncoding, 4096); 2159standardOutput = new StreamReader(new FileStream(standardOutputReadPipeHandle, FileAccess.Read, 4096, false), enc, true, 4096); 2163standardError = new StreamReader(new FileStream(standardErrorReadPipeHandle, FileAccess.Read, 4096, false), enc, true, 4096);
System.Activities (1)
System\Activities\Debugger\SourceLocationProvider.cs (1)
147using (FileStream fs = new FileStream(sourcePath, FileMode.Open, FileAccess.Read))
System.AddIn (1)
System\Addin\MiniReflection\MetadataReader\PEFileReader.cs (1)
62FileStream TheFile = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.RandomAccess);
System.Configuration (5)
System\Configuration\AppSettingsSection.cs (1)
127using (Stream sourceFileStream = new FileStream(sourceFileFullPath, FileMode.Open, FileAccess.Read, FileShare.Read)) {
System\Configuration\Internal\InternalConfigHost.cs (2)
144return new FileStream(streamName, FileMode.Open, FileAccess.Read, FileShare.Read); 247stream = new FileStream(writeFileContext.TempNewFilename, FileMode.Create, FileAccess.Write, FileShare.Read);
System\Configuration\Internal\WriteFileContext.cs (2)
169FileAccess.Write, 287FileAccess.Read,
System.Core (7)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (7)
748internal static FileAccess GetFileAccess(MemoryMappedFileAccess access) { 751return FileAccess.Read; 754return FileAccess.Write; 757return FileAccess.ReadWrite; 760return FileAccess.ReadWrite; 763return FileAccess.Read; 766return FileAccess.ReadWrite;
System.Data (18)
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
2114return new FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read);
fx\src\data\System\Data\OleDb\oledbconnectionstring.cs (1)
288using(FileStream fstream = new FileStream(udlfilename, FileMode.Open, FileAccess.Read, FileShare.Read)) {
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (16)
55System.IO.FileAccess access 65System.IO.FileAccess access, 510System.IO.FileAccess access 519case FileAccess.Read: 523case FileAccess.Write: 527case FileAccess.ReadWrite: 530Debug.Assert(access == System.IO.FileAccess.ReadWrite); 577System.IO.FileAccess access, 591if (access != FileAccess.Read && access != FileAccess.Write && access != FileAccess.ReadWrite) 626case System.IO.FileAccess.Read: 632case System.IO.FileAccess.Write: 638case System.IO.FileAccess.ReadWrite: 641Debug.Assert(access == System.IO.FileAccess.ReadWrite); 760if ( access == System.IO.FileAccess.ReadWrite )
System.Data.Entity.Design (1)
System\Data\EntityModel\Emitters\ClientApiGenerator.cs (1)
120tempFileStream = new System.IO.FileStream(filename, System.IO.FileMode.CreateNew, System.IO.FileAccess.ReadWrite,
System.Data.Services.Design (1)
System\Data\EntityModel\Emitters\ClientApiGenerator.cs (1)
279tempFileStream = new System.IO.FileStream(filename, System.IO.FileMode.CreateNew, System.IO.FileAccess.ReadWrite,
System.Drawing (1)
commonui\System\Drawing\Icon.cs (1)
101using (FileStream f = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) {
System.IO.Log (28)
System\IO\Log\FileRecordSequence.cs (7)
24FileAccess access; 30public FileRecordSequence(string path) : this(path, FileAccess.ReadWrite, 0) { } 32public FileRecordSequence(string path, FileAccess access) : this(path, access, 0) { } 35public FileRecordSequence(string path, FileAccess access, int size) 146if ((this.access & FileAccess.Write) == 0) 543if ((this.access & FileAccess.Read) == 0) 559if ((this.access & FileAccess.Read) == 0)
System\IO\Log\FileRegion.cs (1)
79FileAccess.Read,
System\IO\Log\LogRecordSequence.cs (6)
56FileAccess access) 69FileAccess access, 83FileAccess access, 104FileAccess access, 328if ((this.store.Access & FileAccess.Write) == 0) 432if ((this.store.Access & FileAccess.Write) == 0)
System\IO\Log\LogStore.cs (14)
40FileAccess access; 45: this(path, mode, FileAccess.ReadWrite) 52FileAccess access) 60FileAccess access, 73FileAccess access, 117(access == FileAccess.Read ? GENERIC_READ : 118access == FileAccess.Write ? GENERIC_WRITE : 142bool writeOnly = (access & FileAccess.Read) == 0; 359internal FileAccess Access 529FileAccess access, 542if (access < FileAccess.Read || access > FileAccess.ReadWrite) 552if ((mode == FileMode.CreateNew) && ((access & FileAccess.Write) == 0)) 556if ((mode == FileMode.OpenOrCreate) && ((access & FileAccess.Write) == 0))
System.Runtime.Remoting (1)
metadata\metadata.cs (1)
153FileStream fs = new FileStream(stfilename, FileMode.Create, FileAccess.ReadWrite);
System.Web (26)
Compilation\AssemblyBuilder.cs (3)
241Stream temp = new FileStream(generatedFilePath, FileMode.Create, FileAccess.Write, FileShare.Read); 667using (Stream stream = new FileStream(physicalPath, FileMode.Open, FileAccess.Read, FileShare.Read)) { 1298Stream temp = new FileStream(generatedCodeFile, FileMode.Create, FileAccess.Write, FileShare.Read);
Configuration\BrowserCapabilitiesCodeGenerator.cs (2)
845using (FileStream pktStream = new FileStream(filename, FileMode.Create, FileAccess.Write)) { 863using (FileStream pktStream = new FileStream(filename, FileMode.Open, FileAccess.Read)) {
Configuration\RemoteWebConfigurationHostServer.cs (1)
108tempFileStream = new FileStream(tempFile, FileMode.CreateNew, FileAccess.Write, FileShare.ReadWrite, data.Length, FileOptions.WriteThrough);
Configuration\StrongNameUtility.cs (1)
50using (FileStream snkStream = new FileStream(filename, FileMode.Create, FileAccess.Write)) {
Hosting\ApplicationManager.cs (1)
1457FileStream file = new FileStream(configFile, FileMode.Open, FileAccess.Read);
Hosting\IIS7WorkerRequest.cs (2)
1048FileAccess.Read, 1079FileAccess.Read,
Hosting\ISAPIWorkerRequest.cs (3)
1385f = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); 1421f = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); 1440f = new FileStream(new Microsoft.Win32.SafeHandles.SafeFileHandle(handle,false), FileAccess.Read);
Hosting\MapPathBasedVirtualPathProvider.cs (1)
189return new FileStream(_physicalPath, FileMode.Open, FileAccess.Read, FileShare.Read);
HttpInputStream.cs (1)
236_filestream = new FileStream(_filename, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 4096, FileOptions.DeleteOnClose);
HttpResponse.cs (5)
2769f = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); 2816using (FileStream f = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) { 2847f = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); 2895f = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); 2924f = new FileStream(new Microsoft.Win32.SafeHandles.SafeFileHandle(fileHandle,false), FileAccess.Read);
HttpRuntime.cs (2)
1254using (FileStream fs = new FileStream(appOfflineFile, FileMode.Open, FileAccess.Read, FileShare.Read)) { 3243FileStream file = new FileStream(configFile, FileMode.Open, FileAccess.Read);
HttpWriter.cs (1)
470f = new FileStream(_filename, FileMode.Open, FileAccess.Read, FileShare.Read);
UI\Control.cs (2)
2200return new FileStream(physicalPath, FileMode.Open, FileAccess.Read, FileShare.Read); 2225stream = new FileStream(physicalPath, FileMode.Open, FileAccess.Read, FileShare.Read);
Util\SmtpMail.cs (1)
613File.Open(_filename, FileMode.Open, FileAccess.Read, FileShare.Read).Close();
System.Web.DataVisualization (1)
WebForm\General\ChartHttpHandler.cs (1)
213_controllerFileStream = new System.IO.FileStream(controllerFileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite);
System.Web.Extensions (1)
ClientServices\Providers\ClientData.cs (1)
228using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {
System.Web.Services (1)
System\Web\Services\Discovery\DiscoveryRequestHandler.cs (1)
54stream = new FileStream(physicalPath, FileMode.Open, FileAccess.Read);
System.Windows.Forms (8)
winforms\Managed\System\Resources\ResXFileRef.cs (1)
307using (FileStream s = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) {
winforms\Managed\System\Resources\ResXResourceReader.cs (1)
286stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
winforms\Managed\System\WinForms\Cursor.cs (1)
123FileStream f = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
winforms\Managed\System\WinForms\OpenFileDialog.cs (1)
161s = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
winforms\Managed\System\WinForms\PropertyGrid.cs (2)
5333FileStream fs = new FileStream(fullFileName, FileMode.Create, FileAccess.Write); 5369FileStream fs = new FileStream(fullFileName, FileMode.Open, FileAccess.Read);
winforms\Managed\System\WinForms\RichTextBox.cs (1)
2417Stream file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
winforms\Managed\System\WinForms\SaveFileDialog.cs (1)
113s = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite);
System.Workflow.ComponentModel (2)
AuthoringOM\Compiler\CompileXomlTask.cs (1)
630using (StreamWriter fileStream = new StreamWriter(new FileStream(tempFile, FileMode.Create, FileAccess.Write), Encoding.UTF8))
AuthoringOM\Compiler\XomlCompilerHelpers.cs (1)
708Stream temp = new FileStream(filenames[i], FileMode.Create, FileAccess.Write, FileShare.Read);
System.WorkflowServices (2)
System\Workflow\Runtime\StreamedWorkflowDefinitionContext.cs (2)
58workflowDefStream = new FileStream(workflowDefinitionPath, FileMode.Open, FileAccess.Read); 62ruleDefStream = new FileStream(ruleDefinitionPath, FileMode.Open, FileAccess.Read);
System.Xml (5)
System\Xml\Core\XmlTextWriter.cs (1)
279FileAccess.Write, FileShare.Read), encoding) {
System\Xml\Core\XmlWriterSettings.cs (1)
454fs = new FileStream(outputFileName, FileMode.Create, FileAccess.Write, FileShare.Read, 0x1000, useAsync);
System\Xml\XmlDownloadManager.cs (1)
30return new FileStream( uri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.Read, 1 );
System\Xml\XmlDownloadManagerAsync.cs (1)
23return Task.Run<Stream>(() => { return new FileStream(uri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.Read, 1, true); });
System\Xml\Xslt\XslTransform.cs (1)
239fs = new FileStream(outputfile, FileMode.Create, FileAccess.ReadWrite);
WindowsBase (194)
Base\MS\Internal\IO\Packaging\Certificate.cs (1)
134using (Stream s = _part.GetStream(FileMode.Create, FileAccess.Write))
Base\MS\Internal\IO\Packaging\CompoundFile\CFStream.cs (10)
45return (!StreamDisposed && (FileAccess.Read == (access & FileAccess.Read) || 46FileAccess.ReadWrite == (access & FileAccess.ReadWrite))); 69return (!StreamDisposed && (FileAccess.Write == (access & FileAccess.Write) || 70FileAccess.ReadWrite == (access & FileAccess.ReadWrite))); 314FileAccess openAccess, 360FileAccess access;
Base\MS\Internal\IO\Packaging\CompoundFile\NativeCompoundFileAPIs.cs (12)
61internal static void UpdateModeFlagFromFileAccess( FileAccess access, ref int grfMode ) 66if( FileAccess.Write == access ) 72if( ( FileAccess.ReadWrite == (access & FileAccess.ReadWrite) ) || 73( (FileAccess.Read | FileAccess.Write) == (access & (FileAccess.Read | FileAccess.Write))) ) 77else if( FileAccess.Write == (access & FileAccess.Write) ) 81else if( FileAccess.Read != (access & FileAccess.Read))
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptionTransform.cs (2)
824using (Stream stream = si.GetStream(FileMode.Open, FileAccess.Read)) 877using (Stream stream = si.GetStream(FileMode.Open, FileAccess.Read))
Base\MS\Internal\IO\Packaging\CompoundFile\UserUseLicenseDictionaryLoader.cs (1)
132using (Stream stream = si.GetStream(FileMode.Open, FileAccess.Read))
Base\MS\Internal\IO\Packaging\InterleavedZipPartStream.cs (2)
59internal InterleavedZipPartStream(ZipPackagePart owningPart, FileMode mode, FileAccess access) 71FileMode mode, FileAccess access)
Base\MS\Internal\IO\Packaging\InternalRelationshipCollection.cs (5)
248if (package.FileOpenAccess != FileAccess.Write && package.PartExists(_uri)) 286Debug.Assert(_package.FileOpenAccess == FileAccess.Read || _package.FileOpenAccess == FileAccess.ReadWrite, 289using (Stream s = part.GetStream(FileMode.Open, FileAccess.Read)) 781FileMode.CreateNew, FileAccess.Write);
Base\MS\Internal\IO\Packaging\PartBasedPackageProperties.cs (6)
506if (_package.FileOpenAccess == FileAccess.Write) 564Stream stream = part.GetStream(FileMode.Open, FileAccess.Read); 772writerStream = _propertyPart.GetStream(FileMode.Create, FileAccess.Write); 774writerStream = new IgnoreFlushAndCloseStream(_propertyPart.GetStream(FileMode.Create, FileAccess.Write)); 794if (_package.FileOpenAccess == FileAccess.Read || _package.FileOpenAccess == FileAccess.ReadWrite)
Base\MS\Internal\IO\Packaging\PieceDirectory.cs (2)
163internal PieceDirectory(List<PieceInfo> sortedPieceInfoList, FileMode mode, FileAccess access) 537private FileAccess _fileAccess;
Base\MS\Internal\IO\Packaging\streamingZipPartStream.cs (3)
54FileAccess access) 58&& access == FileAccess.Write) ) 355private FileAccess _access;
Base\MS\Internal\IO\Packaging\XmlDigitalSignatureProcessor.cs (2)
189s = part.GetStream(FileMode.Open, FileAccess.Read); 999using (Stream s = SignaturePart.GetStream(FileMode.Create, FileAccess.Write))
Base\MS\Internal\IO\Packaging\XmlSignatureManifest.cs (1)
786using (Stream s = part.GetStream(FileMode.Open, FileAccess.Read))
Base\MS\Internal\IO\Zip\ZipArchive.cs (35)
71internal static ZipArchive OpenOnFile(string path, FileMode mode, FileAccess access, FileShare share, bool streaming) 126internal static ZipArchive OpenOnStream(Stream stream, FileMode mode, FileAccess access, bool streaming) 178if (_openAccess == FileAccess.Read) 226if (_openAccess == FileAccess.Write) 291if (_openAccess == FileAccess.Read) 323if (_openAccess == FileAccess.Write) 398internal FileAccess OpenAccess 451private ZipArchive(Stream archiveStream, FileMode mode, FileAccess access, bool streaming, bool ownStream) 500if (_openAccess == FileAccess.ReadWrite || _openAccess == FileAccess.Write) 524static private void ValidateModeAccessShareStreaming(Stream stream, FileMode mode, FileAccess access, FileShare share, bool streaming) 569static private void ValidateModeAccessStreamStreamingCombinations(Stream stream, FileAccess access, bool streaming) 574if ((access== FileAccess.Read || access == FileAccess.ReadWrite) && !stream.CanRead) 580if ((access == FileAccess.Write || access == FileAccess.ReadWrite) && !stream.CanWrite) 609static private void ValidateModeAccessShareValidEnums(FileMode mode, FileAccess access, FileShare share) 619else if ((access != FileAccess.Read) && (access != FileAccess.ReadWrite) && (access != FileAccess.Write)) 674{(int)FileMode.Create, (int)FileAccess.Write, (int)FileShare.None, 1}, 675{(int)FileMode.Create, (int)FileAccess.Write, (int)FileShare.Read, 1}, 676{(int)FileMode.Create, (int)FileAccess.ReadWrite, (int)FileShare.None, 0}, 677{(int)FileMode.CreateNew, (int)FileAccess.Write, (int)FileShare.None, 1}, 678{(int)FileMode.CreateNew, (int)FileAccess.Write, (int)FileShare.Read, 1}, 679{(int)FileMode.CreateNew, (int)FileAccess.ReadWrite, (int)FileShare.None, 0}, 680{(int)FileMode.Open, (int)FileAccess.Read, (int)FileShare.None, 1}, 681{(int)FileMode.Open, (int)FileAccess.Read, (int)FileShare.None, 0}, 682{(int)FileMode.Open, (int)FileAccess.Read, (int)FileShare.Read, 1}, 683{(int)FileMode.Open, (int)FileAccess.Read, (int)FileShare.Read, 0}, 684{(int)FileMode.Open, (int)FileAccess.Read, (int)FileShare.Write, 1}, 685{(int)FileMode.Open, (int)FileAccess.Read, (int)FileShare.ReadWrite, 1}, 686{(int)FileMode.Open, (int)FileAccess.ReadWrite, (int)FileShare.None, 0}, 687{(int)FileMode.OpenOrCreate, (int)FileAccess.ReadWrite, (int)FileShare.None, 0} 693private FileAccess _openAccess;
Base\MS\Internal\IO\Zip\ZipFileInfo.cs (1)
53internal Stream GetStream(FileMode mode, FileAccess access)
Base\MS\Internal\IO\Zip\ZipIOLocalFileBlock.cs (5)
436internal Stream GetStream(FileMode mode, FileAccess access) 822static private void CheckFileAccessParameter(Stream stream, FileAccess access) 826case FileAccess.Read: 832case FileAccess.Write: 838case FileAccess.ReadWrite:
Base\MS\Internal\IO\Zip\ZipIOModeEnforcingStream.cs (8)
55((_access == FileAccess.Read) || (_access == FileAccess.ReadWrite))); 73((_access == FileAccess.Write) || (_access == FileAccess.ReadWrite))); 265if (_access == FileAccess.ReadWrite || _access == FileAccess.Write) 296internal ZipIOModeEnforcingStream(Stream baseStream, FileAccess access, 322private FileAccess _access;
Base\System\IO\Packaging\CompoundFile\DataSpaceManager.cs (3)
546if (FileAccess.Read != _associatedStorage.OpenAccess && DirtyFlag) 832if (_associatedStorage.OpenAccess == FileAccess.Read) 1379if (_associatedStorage.OpenAccess == FileAccess.Read)
Base\System\IO\Packaging\CompoundFile\StorageInfo.cs (1)
794if( FileAccess.Read == Root.OpenAccess )
Base\System\IO\Packaging\CompoundFile\StorageRoot.cs (8)
42const FileAccess defaultFileAccess = FileAccess.ReadWrite; 87internal FileAccess OpenAccess 94return FileAccess.Read; 98return FileAccess.ReadWrite; 224FileAccess access ) 238FileAccess access, 253FileAccess access,
Base\System\IO\Packaging\CompoundFile\StreamInfo.cs (15)
117private FileAccess openFileAccess; 260public Stream GetStream( FileMode mode, FileAccess access ) 273if (parentStorage.Root.OpenAccess == FileAccess.ReadWrite) 276access = FileAccess.ReadWrite; 342if( FileAccess.Read != parentStorage.Root.OpenAccess && 343FileAccess.Read != openFileAccess ) 443private Stream Create( FileMode mode, FileAccess access ) 455internal Stream Create( FileMode mode, FileAccess access, string dataSpace ) 486if (parentStorage.Root.OpenAccess == FileAccess.ReadWrite) 488access = FileAccess.ReadWrite; 566FileAccess access, 589void CreateTimeReadOnlyCheck( FileAccess access ) 592if( FileAccess.Read == parentStorage.Root.OpenAccess ) 597if( access == FileAccess.Read ) 746private Stream CFStreamOfClone( FileAccess access )
Base\System\IO\Packaging\EncryptedPackage.cs (13)
117if (_root.OpenAccess != FileAccess.ReadWrite) 213if (_root.OpenAccess != FileAccess.ReadWrite) 239FileAccess access, 432FileAccess access 455FileAccess access, 515root = StorageRoot.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read); 704public FileAccess FileOpenAccess 739FileAccess fileAccessForPackage = 0 ; 743fileAccessForPackage |= FileAccess.Read; 746fileAccessForPackage |= FileAccess.Write; 1171_package = Package.Open(_packageStream, FileMode.Create, FileAccess.ReadWrite); 1228private const FileAccess _defaultFileAccess = FileAccess.ReadWrite;
Base\System\IO\Packaging\Package.cs (38)
54protected Package(FileAccess openFileAccess) 67protected Package(FileAccess openFileAccess, bool streaming) 77_inStreamingCreation = (openFileAccess == FileAccess.Write && streaming); 96public FileAccess FileOpenAccess 178public static Package Open(string path, FileMode packageMode, FileAccess packageAccess) 204public static Package Open(string path, FileMode packageMode, FileAccess packageAccess, FileShare packageShare) 261public static Package Open(Stream stream, FileMode packageMode, FileAccess packageAccess) 919if (_openFileAccess == FileAccess.Read) 926if (_openFileAccess == FileAccess.Write) 940internal static void ThrowIfFileAccessInvalid(FileAccess access) 943if (access < FileAccess.Read || access > FileAccess.ReadWrite) 974FileAccess packageAccess, 1013if (package.FileOpenAccess == FileAccess.ReadWrite || package.FileOpenAccess == FileAccess.Read) 1050internal static Package Open(Stream stream, FileMode packageMode, FileAccess packageAccess, bool streaming) 1079if (package.FileOpenAccess == FileAccess.ReadWrite || package.FileOpenAccess == FileAccess.Read) 1201FileAccess packageAccess, 1209if (packageAccess != FileAccess.Write) 1225private static Stream ValidateModeAndAccess(Stream s, FileMode mode, FileAccess access) 1232if (!s.CanWrite && (access == FileAccess.ReadWrite || access == FileAccess.Write)) 1237if (!s.CanRead && (access == FileAccess.ReadWrite || access == FileAccess.Read)) 1242if ((s.CanRead && s.CanWrite) && (access == FileAccess.Read || access == FileAccess.Write)) 1277if (_relationships != null && _openFileAccess != FileAccess.Read) 1456private static readonly FileAccess _defaultFileAccess = FileAccess.ReadWrite; 1460private static readonly FileAccess _defaultStreamAccess = FileAccess.Read; 1463private FileAccess _openFileAccess; 1497internal RestrictedStream(Stream stream, FileAccess access) 1504Debug.Assert(access==FileAccess.Read || access == FileAccess.Write, 1509if (access == FileAccess.Read) 1515if (access == FileAccess.Write)
Base\System\IO\Packaging\PackageDigitalSignatureManager.cs (1)
1373return (_container.FileOpenAccess == FileAccess.Read);
Base\System\IO\Packaging\PackagePart.cs (9)
353public Stream GetStream(FileMode mode, FileAccess access) 392protected abstract Stream GetStreamCore(FileMode mode, FileAccess access); 732if (_relationships != null && _container.FileOpenAccess != FileAccess.Read) 803private void ThrowIfOpenAccessModesAreIncompatible(FileMode mode, FileAccess access) 809if(access == FileAccess.Read && 814if((_container.FileOpenAccess == FileAccess.Read && access != FileAccess.Read) || 815(_container.FileOpenAccess == FileAccess.Write && access != FileAccess.Write) )
Base\System\IO\Packaging\ZipPackage.cs (7)
401internal ZipPackage(string path, FileMode mode, FileAccess access, FileShare share, bool streaming) 437internal ZipPackage(Stream s, FileMode mode, FileAccess access, bool streaming) 888if(_zipArchive.OpenAccess == FileAccess.Read || _zipArchive.OpenAccess == FileAccess.ReadWrite) 1303return _contentTypeFileInfo.GetStream(FileMode.Open, FileAccess.Read); 1315pieces, FileMode.Open, FileAccess.Read); 1497FileMode.Create, FileAccess.Write);
Base\System\IO\Packaging\ZipPackagePart.cs (1)
57protected override Stream GetStreamCore(FileMode mode, FileAccess access)
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (2)
597string path, FileMode mode, FileAccess access, 739fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None,