Dela via


IHttpSendFileFeature.SendFileAsync Method

Definition

Sends the requested file in the response body. This may bypass the IHttpResponseFeature.Body Stream. A response may include multiple writes.

public:
 System::Threading::Tasks::Task ^ SendFileAsync(System::String ^ path, long offset, Nullable<long> count, System::Threading::CancellationToken cancellation);
public System.Threading.Tasks.Task SendFileAsync (string path, long offset, long? count, System.Threading.CancellationToken cancellation);
abstract member SendFileAsync : string * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendFileAsync (path As String, offset As Long, count As Nullable(Of Long), cancellation As CancellationToken) As Task

Parameters

path
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.

cancellation
CancellationToken

A CancellationToken used to abort the transmission.

Returns

Applies to