Share via


SendFileFallback.SendFileAsync Method

Definition

Copies the segment of the file to the destination stream.

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

Parameters

destination
Stream

The stream to write the file segment to.

filePath
String

The full disk path to the file.

offset
Int64

The offset in the file to start at.

count
Nullable<Int64>

The number of bytes to send, or null to send the remainder of the file.

cancellationToken
CancellationToken

A CancellationToken used to abort the transmission.

Returns

Applies to