Share via


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用于中止传输的 。

返回

适用于