共用方式為


SendFileFallback.SendFileAsync 方法

定義

將檔案的區段複製到目的地資料流程。

public:
 static System::Threading::Tasks::Task ^ SendFileAsync(System::IO::Stream ^ destination, System::String ^ filePath, long offset, Nullable<long> count, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task SendFileAsync (System.IO.Stream destination, string filePath, long offset, long? count, System.Threading.CancellationToken cancellationToken);
static member SendFileAsync : System.IO.Stream * string * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function SendFileAsync (destination As Stream, filePath As String, offset As Long, count As Nullable(Of Long), cancellationToken As CancellationToken) As Task

參數

destination
Stream

要寫入檔案區段的資料流程。

filePath
String

檔案的完整磁片路徑。

offset
Int64

要開始之檔案中的位移。

count
Nullable<Int64>

要傳送的位元組數目,或為 null 來傳送檔案的其餘部分。

cancellationToken
CancellationToken

CancellationToken 用來中止傳輸。

傳回

適用於