DavFile.ReadAsync Method

Namespace:
Weavy.Web.WebDAV
Assembly:
Weavy.Web.dll

ReadAsync(Stream, long, long)

Writes the content of the file to the specified stream.

By default ASP.NET buffers content on server side before sending output. You must turn off buffering to eliminate keeping entire file content in memory before sending:

HttpContext.Current.Response.BufferOutput = false;

Client application can request only a part of a file specifying Range header. Download managers may use this header to download single file using several threads at a time.

public Task ReadAsync(Stream output, long startIndex, long count)

Parameters

output
System.IO.Stream

Output stream.

startIndex
long

The zero-bazed byte offset in file content at which to begin copying bytes to the output stream.

count
long

The number of bytes to be written to the output stream.

Returns

System.Threading.Tasks.Task