Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.IO.FileStream Class Reference

Public Member Functions

 FileStream (IntPtr handle, FileAccess access)
 
 FileStream (IntPtr handle, FileAccess access, bool ownsHandle)
 
 FileStream (IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize)
 
 FileStream (IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync)
 
 FileStream (SafeFileHandle handle, FileAccess access)
 
 FileStream (SafeFileHandle handle, FileAccess access, int bufferSize)
 
 FileStream (SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync)
 
 FileStream (string path, FileMode mode)
 
 FileStream (string path, FileMode mode, FileAccess access)
 
 FileStream (string path, FileMode mode, FileAccess access, FileShare share)
 
 FileStream (string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
 
 FileStream (string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)
 
 FileStream (string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)
 
 FileStream (string path, FileStreamOptions options)
 
virtual void Lock (long position, long length)
 
virtual void Unlock (long position, long length)
 
override Task FlushAsync (CancellationToken cancellationToken)
 
override int Read (byte[] buffer, int offset, int count)
 
override int Read (Span< byte > buffer)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
override void Write (byte[] buffer, int offset, int count)
 
override void Write (ReadOnlySpan< byte > buffer)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
override void Flush ()
 
virtual void Flush (bool flushToDisk)
 
override void SetLength (long value)
 
override int ReadByte ()
 
override void WriteByte (byte value)
 
override ValueTask DisposeAsync ()
 
override void CopyTo (Stream destination, int bufferSize)
 
override Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override int EndRead (IAsyncResult asyncResult)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override void EndWrite (IAsyncResult asyncResult)
 
override long Seek (long offset, SeekOrigin origin)
 
void CopyTo (Stream destination)
 
Task CopyToAsync (Stream destination)
 
Task CopyToAsync (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination, CancellationToken cancellationToken)
 
void Dispose ()
 
virtual void Close ()
 
Task FlushAsync ()
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
object GetLifetimeService ()
 
virtual object InitializeLifetimeService ()
 

Static Public Member Functions

static Stream Synchronized (Stream stream)
 

Static Public Attributes

static readonly Stream Null = new NullStream()
 

Protected Member Functions

override void Dispose (bool disposing)
 
SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized ()
 
virtual WaitHandle CreateWaitHandle ()
 
virtual void ObjectInvariant ()
 
MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 

Static Protected Member Functions

static void ValidateBufferArguments (byte[] buffer, int offset, int count)
 
static void ValidateCopyToArguments (Stream destination, int bufferSize)
 

Protected Attributes

SemaphoreSlim _asyncActiveSemaphore
 

Package Functions

void DisposeInternal (bool disposing)
 
Task BaseFlushAsync (CancellationToken cancellationToken)
 
int BaseRead (Span< byte > buffer)
 
Task< int > BaseReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
ValueTask< int > BaseReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
void BaseWrite (ReadOnlySpan< byte > buffer)
 
Task BaseWriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
ValueTask BaseWriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
ValueTask BaseDisposeAsync ()
 
Task BaseCopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
IAsyncResult BaseBeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
int BaseEndRead (IAsyncResult asyncResult)
 
IAsyncResult BaseBeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
void BaseEndWrite (IAsyncResult asyncResult)
 
Task< int > BeginReadInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 
Task BeginWriteInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 

Properties

virtual IntPtr Handle [get]
 
override bool CanRead [get]
 
override bool CanWrite [get]
 
virtual SafeFileHandle SafeFileHandle [get]
 
virtual string Name [get]
 
virtual bool IsAsync [get]
 
override long Length [get]
 
override long Position [get, set]
 
override bool CanSeek [get]
 
virtual bool CanTimeout [get]
 
virtual int ReadTimeout [get, set]
 
virtual int WriteTimeout [get, set]
 

Private Member Functions

 FileStream (string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, long preallocationSize)
 
void ValidateReadWriteArgs (byte[] buffer, int offset, int count)
 
bool HasOverriddenBeginEndRead ()
 
bool HasOverriddenBeginEndWrite ()
 
int GetCopyBufferSize ()
 
Task< int > BeginEndReadAsync (byte[] buffer, int offset, int count)
 
void FinishTrackingAsyncOperation (ReadWriteTask task)
 
Task BeginEndWriteAsync (byte[] buffer, int offset, int count)
 

Static Private Member Functions

static void ValidateHandle (SafeFileHandle handle, FileAccess access, int bufferSize)
 
static void ValidateHandle (SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync)
 
static void RunReadWriteTaskWhenReady (Task asyncWaiter, ReadWriteTask readWriteTask)
 
static void RunReadWriteTask (ReadWriteTask readWriteTask)
 
static async Task FinishWriteAsync (Task writeTask, byte[] localBuffer)
 

Private Attributes

readonly FileStreamStrategy _strategy
 

Detailed Description

Definition at line 10 of file FileStream.cs.


The documentation for this class was generated from the following file: