Core.OpenAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads a file from server. This is an asynchronous operation.
public static System.Threading.Tasks.Task<int> OpenAsync (string path, string sessionId, long offsetFile, byte[] buffer, int offset, int lengthFile, Microsoft.Azure.DataLake.Store.AdlsClient client, Microsoft.Azure.DataLake.Store.RequestOptions req, Microsoft.Azure.DataLake.Store.OperationResponse resp, System.Threading.CancellationToken cancelToken = default);
static member OpenAsync : string * string * int64 * byte[] * int * int * Microsoft.Azure.DataLake.Store.AdlsClient * Microsoft.Azure.DataLake.Store.RequestOptions * Microsoft.Azure.DataLake.Store.OperationResponse * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Shared Function OpenAsync (path As String, sessionId As String, offsetFile As Long, buffer As Byte(), offset As Integer, lengthFile As Integer, client As AdlsClient, req As RequestOptions, resp As OperationResponse, Optional cancelToken As CancellationToken = Nothing) As Task(Of Integer)
Parameters
- path
- String
Path of the file
- sessionId
- String
UUID that is used to obtain the file handler (stream) easily at server
- offsetFile
- Int64
Offset in the file at which data will be read from
- buffer
- Byte[]
Buffer where data read will be stored
- offset
- Int32
Offset in buffer where data will be read
- lengthFile
- Int32
Length of the data to be read
- client
- AdlsClient
ADLS Client
- req
- RequestOptions
Options to change behavior of the Http request
- resp
- OperationResponse
Stores the response/ouput of the Http request
- cancelToken
- CancellationToken
CancellationToken to cancel the request
Returns
Number of bytes read
Applies to
Azure SDK for .NET