Class OdfDirectIoWritableStream
Provides a write-only stream optimized for Direct I/O file access when the platform supports it. 提供在平台支援時使用 Direct I/O 檔案存取最佳化的唯寫資料流。
public sealed class OdfDirectIoWritableStream : Stream, IDisposable, IAsyncDisposable
- Inheritance
-
OdfDirectIoWritableStream
- Implements
- Inherited Members
Constructors
OdfDirectIoWritableStream(string)
Initializes a new instance of the OdfDirectIoWritableStream class. 初始化 OdfDirectIoWritableStream 類別的新執行個體。
public OdfDirectIoWritableStream(string filePath)
Parameters
filePathstringThe path of the file to write. / 要寫入的檔案路徑。
Properties
CanRead
Provides the CanRead member. 提供 CanRead 成員。
public override bool CanRead { get; }
Property Value
CanSeek
Provides the CanSeek member. 提供 CanSeek 成員。
public override bool CanSeek { get; }
Property Value
CanWrite
Provides the CanWrite member. 提供 CanWrite 成員。
public override bool CanWrite { get; }
Property Value
Length
Performs length. 執行 Length。
public override long Length { get; }
Property Value
Position
Gets the number of bytes accepted by the stream. 取得資料流已接受的位元組數。
public override long Position { get; set; }
Property Value
Methods
Dispose(bool)
Releases unmanaged resources. 釋放非受控資源。
protected override void Dispose(bool disposing)
Parameters
disposingbool
Flush()
Performs flush. 執行 Flush。
public override void Flush()
Read(byte[], int, int)
Performs the Read operation. 執行 Read 作業。
public override int Read(byte[] buffer, int offset, int count)
Parameters
Returns
Seek(long, SeekOrigin)
Performs seek. 執行 Seek。
public override long Seek(long offset, SeekOrigin origin)
Parameters
offsetlongoriginSeekOrigin
Returns
SetLength(long)
Sets length. 設定 Length。
public override void SetLength(long value)
Parameters
valuelong
Write(byte[], int, int)
Performs the Write operation. 執行 Write 作業。
public override void Write(byte[] buffer, int offset, int count)
Parameters
WriteAsync(byte[], int, int, CancellationToken)
Writes async. 寫入 Async。
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
bufferbyte[]offsetintcountintcancellationTokenCancellationToken