Méthode | Description | |
---|---|---|
BeginRead ( byte array, int offset, int numBytes, AsyncCallback callback, object state ) : IAsyncResult | ||
BeginWrite ( byte array, int offset, int numBytes, AsyncCallback callback, object state ) : IAsyncResult | ||
CopyToAsync ( |
||
EndRead ( IAsyncResult asyncResult ) : int | ||
EndWrite ( IAsyncResult asyncResult ) : void | ||
FileStream ( System.IO.SafeFileHandle handle, FileAccess access ) : System.Threading | ||
FileStream ( System.IO.SafeFileHandle handle, FileAccess access, int bufferSize ) : System.Threading | ||
FileStream ( System.IO.SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync ) : System.Threading | ||
FileStream ( string path, FileMode mode ) : System.Threading | ||
FileStream ( string path, FileMode mode, FileAccess access ) : System.Threading | ||
FileStream ( string path, FileMode mode, FileAccess access, FileShare share ) : System.Threading | ||
FileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize ) : System.Threading | ||
FileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options ) : System.Threading | ||
FileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync ) : System.Threading | ||
Flush ( ) : void |
Clears buffers for this stream and causes any buffered data to be written to the file.
|
|
Flush ( bool flushToDisk ) : void |
Clears buffers for this stream, and if is true, causes any buffered data to be written to the file.
|
|
FlushAsync ( CancellationToken cancellationToken ) : Task | ||
Lock ( long position, long length ) : void | ||
Read ( byte array, int offset, int count ) : int | ||
ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task |
||
ReadByte ( ) : int | ||
Seek ( long offset, SeekOrigin origin ) : long | ||
SetLength ( long value ) : void |
Sets the length of this stream to the given value.
|
|
Unlock ( long position, long length ) : void | ||
Write ( byte array, int offset, int count ) : void | ||
WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task | ||
WriteByte ( byte value ) : void |
Méthode | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Méthode | Description | |
---|---|---|
AssertBufferInvariants ( ) : void | ||
AssertCanRead ( byte buffer, int offset, int count ) : void | ||
AsyncModeCopyToAsync ( |
||
CheckFileCall ( int result, bool ignoreNotSupported = false ) : int | ||
CheckFileCall ( long result, bool ignoreNotSupported = false ) : long | ||
CompareExchangeCurrentOverlappedOwner ( FileStreamCompletionSource newSource, FileStreamCompletionSource existingSource ) : FileStreamCompletionSource | ||
FlushAsyncInternal ( CancellationToken cancellationToken ) : Task | ||
FlushInternalBuffer ( ) : void |
Flushes the internal read/write buffer for this stream. If write data has been buffered, that data is written out to the underlying file. Or if data has been buffered for reading from the stream, the data is dumped and our position in the underlying file is rewound as necessary. This does not flush the OS buffer.
|
|
FlushOSBuffer ( ) : void | ||
FlushReadBuffer ( ) : void |
Dumps any read data in the buffer and rewinds our position in the stream, accordingly, as necessary.
|
|
FlushWriteAsync ( CancellationToken cancellationToken ) : Task | ||
FlushWriteBuffer ( ) : void |
Writes any data in the write buffer to the underlying stream and resets the buffer.
|
|
FlushWriteBuffer ( bool calledFromFinalizer = false ) : void | ||
GetBuffer ( ) : byte[] |
Gets the array used for buffering reading and writing. If the array hasn't been allocated, this will lazily allocate it.
|
|
GetDefaultIsAsync ( System.IO.SafeFileHandle handle ) : bool | ||
GetLastWin32ErrorAndDisposeHandleIfInvalid ( bool throwIfInvalidHandle = false ) : int | ||
GetLengthInternal ( ) : long | ||
GetSecAttrs ( FileShare share ) : Interop.Kernel32.SECURITY_ATTRIBUTES | ||
GetSuppressBindHandle ( System.IO.SafeFileHandle handle ) : bool | ||
Init ( FileMode mode, FileShare share ) : void | ||
InitFromHandle ( System.IO.SafeFileHandle handle ) : void | ||
InternalAppend ( string path, int bufferSize = DefaultBufferSize, bool useAsync = DefaultIsAsync ) : |
||
InternalCreate ( string path, int bufferSize = DefaultBufferSize, bool useAsync = DefaultIsAsync ) : |
||
InternalOpen ( string path, int bufferSize = DefaultBufferSize, bool useAsync = DefaultIsAsync ) : |
||
LockInternal ( long position, long length ) : void | ||
OnBufferAllocated ( ) : void | ||
OpenHandle ( FileMode mode, FileShare share, FileOptions options ) : System.IO.SafeFileHandle | ||
PreOpenConfigurationFromOptions ( FileMode mode, FileAccess access, FileOptions options ) : Interop.Sys.OpenFlags |
Translates the FileMode, FileAccess, and FileOptions values into flags to be passed when opening the file.
|
|
PrepareForReading ( ) : void |
Validates that we're ready to read from the stream.
|
|
PrepareForWriting ( ) : void |
Validates that we're ready to write to the stream, including flushing a read buffer if necessary.
|
|
ReadAsyncInternal ( byte array, int offset, int numBytes, CancellationToken cancellationToken ) : Task |
||
ReadByteCore ( ) : int | ||
ReadCore ( byte array, int offset, int count ) : int | ||
ReadFileNative ( System.IO.SafeFileHandle handle, byte bytes, int offset, int count, NativeOverlapped overlapped, int &errorCode ) : int | ||
ReadNative ( byte buffer, int offset, int count ) : int | ||
ReadNativeAsync ( byte bytes, int offset, int numBytes, int numBufferedBytesRead, CancellationToken cancellationToken ) : Task |
||
SeekCore ( long offset, SeekOrigin origin ) : long | ||
SetLengthCore ( long value ) : void | ||
SetLengthInternal ( long value ) : void | ||
TaskFromResultOrCache ( int result ) : Task |
||
UnlockInternal ( long position, long length ) : void | ||
ValidateReadWriteArgs ( byte array, int offset, int count ) : void |
Validates arguments to Read and Write and throws resulting exceptions.
|
|
VerifyHandleIsSync ( ) : void | ||
VerifyOSHandlePosition ( ) : void |
Verify that the actual position of the OS's handle equals what we expect it to. This will fail if someone else moved the UnixFileStream's handle or if our position updating code is incorrect.
|
|
WriteAsyncInternal ( byte array, int offset, int numBytes, CancellationToken cancellationToken ) : Task | ||
WriteByteCore ( byte value ) : void | ||
WriteCore ( byte buffer, int offset, int count ) : void | ||
WriteFileNative ( System.IO.SafeFileHandle handle, byte bytes, int offset, int count, NativeOverlapped overlapped, int &errorCode ) : int | ||
WriteInternalCoreAsync ( byte bytes, int offset, int numBytes, CancellationToken cancellationToken ) : Task | ||
WriteNative ( byte array, int offset, int count ) : void |
Unbuffered, writes a block of bytes to the file stream.
|
public BeginRead ( byte array, int offset, int numBytes, AsyncCallback callback, object state ) : IAsyncResult | ||
array | byte | |
offset | int | |
numBytes | int | |
callback | AsyncCallback | |
state | object | |
Résultat | IAsyncResult |
public BeginWrite ( byte array, int offset, int numBytes, AsyncCallback callback, object state ) : IAsyncResult | ||
array | byte | |
offset | int | |
numBytes | int | |
callback | AsyncCallback | |
state | object | |
Résultat | IAsyncResult |
public CopyToAsync ( |
||
destination | ||
bufferSize | int | |
cancellationToken | CancellationToken | |
Résultat | Task |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
Résultat | void |
public EndRead ( IAsyncResult asyncResult ) : int | ||
asyncResult | IAsyncResult | |
Résultat | int |
public EndWrite ( IAsyncResult asyncResult ) : void | ||
asyncResult | IAsyncResult | |
Résultat | void |
public FileStream ( System.IO.SafeFileHandle handle, FileAccess access ) : System.Threading | ||
handle | System.IO.SafeFileHandle | |
access | FileAccess | |
Résultat | System.Threading |
public FileStream ( System.IO.SafeFileHandle handle, FileAccess access, int bufferSize ) : System.Threading | ||
handle | System.IO.SafeFileHandle | |
access | FileAccess | |
bufferSize | int | |
Résultat | System.Threading |
public FileStream ( System.IO.SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync ) : System.Threading | ||
handle | System.IO.SafeFileHandle | |
access | FileAccess | |
bufferSize | int | |
isAsync | bool | |
Résultat | System.Threading |
public FileStream ( string path, FileMode mode ) : System.Threading | ||
path | string | |
mode | FileMode | |
Résultat | System.Threading |
public FileStream ( string path, FileMode mode, FileAccess access ) : System.Threading | ||
path | string | |
mode | FileMode | |
access | FileAccess | |
Résultat | System.Threading |
public FileStream ( string path, FileMode mode, FileAccess access, FileShare share ) : System.Threading | ||
path | string | |
mode | FileMode | |
access | FileAccess | |
share | FileShare | |
Résultat | System.Threading |
public FileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize ) : System.Threading | ||
path | string | |
mode | FileMode | |
access | FileAccess | |
share | FileShare | |
bufferSize | int | |
Résultat | System.Threading |
public FileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options ) : System.Threading | ||
path | string | |
mode | FileMode | |
access | FileAccess | |
share | FileShare | |
bufferSize | int | |
options | FileOptions | |
Résultat | System.Threading |
public FileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync ) : System.Threading | ||
path | string | |
mode | FileMode | |
access | FileAccess | |
share | FileShare | |
bufferSize | int | |
useAsync | bool | |
Résultat | System.Threading |
public FlushAsync ( CancellationToken cancellationToken ) : Task | ||
cancellationToken | CancellationToken | |
Résultat | Task |
public Lock ( long position, long length ) : void | ||
position | long | |
length | long | |
Résultat | void |
public Read ( byte array, int offset, int count ) : int | ||
array | byte | |
offset | int | |
count | int | |
Résultat | int |
public ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task |
||
buffer | byte | |
offset | int | |
count | int | |
cancellationToken | CancellationToken | |
Résultat | Task |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | |
origin | SeekOrigin | |
Résultat | long |
public SetLength ( long value ) : void | ||
value | long | The new length of the stream. |
Résultat | void |
public Unlock ( long position, long length ) : void | ||
position | long | |
length | long | |
Résultat | void |
public Write ( byte array, int offset, int count ) : void | ||
array | byte | |
offset | int | |
count | int | |
Résultat | void |
public WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task | ||
buffer | byte | |
offset | int | |
count | int | |
cancellationToken | CancellationToken | |
Résultat | Task |