共用方式為


DataLakeFileClient.UploadAsync Method

Definition

Overloads

UploadAsync(String, Boolean, CancellationToken)

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the overwrite parameter is not specified and the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

UploadAsync(String, DataLakeFileUploadOptions, CancellationToken)

The UploadAsync(String, DataLakeFileUploadOptions, CancellationToken) operation creates and uploads content to a file. If the file already exists, its content will be overwritten, unless otherwise specified in the Conditions or alternatively use UploadAsync(Stream), UploadAsync(Stream, Boolean, CancellationToken).

For more information, see Update Path.

UploadAsync(Stream, DataLakeFileUploadOptions, CancellationToken)

The UploadAsync(Stream, DataLakeFileUploadOptions, CancellationToken) operation creates and uploads content to a file. If the file already exists, its content will be overwritten, unless otherwise specified in the Conditions or alternatively use UploadAsync(Stream), UploadAsync(Stream, Boolean, CancellationToken).

For more information, see Update Path.

UploadAsync(String)

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

UploadAsync(Stream)

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

UploadAsync(Stream, Boolean, CancellationToken)

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the overwrite parameter is not specified and the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

UploadAsync(String, Boolean, CancellationToken)

Source:
DataLakeFileClient.cs
Source:
DataLakeFileClient.cs

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the overwrite parameter is not specified and the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> UploadAsync (string path, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.UploadAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function UploadAsync (path As String, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PathInfo))

Parameters

path
String

A file path containing the content to upload.

overwrite
Boolean

Whether the upload should overwrite an existing file. The default value is false.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(String, DataLakeFileUploadOptions, CancellationToken)

Source:
DataLakeFileClient.cs
Source:
DataLakeFileClient.cs

The UploadAsync(String, DataLakeFileUploadOptions, CancellationToken) operation creates and uploads content to a file. If the file already exists, its content will be overwritten, unless otherwise specified in the Conditions or alternatively use UploadAsync(Stream), UploadAsync(Stream, Boolean, CancellationToken).

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> UploadAsync (string path, Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAsync : string * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.UploadAsync : string * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function UploadAsync (path As String, options As DataLakeFileUploadOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PathInfo))

Parameters

path
String

A file path containing the content to upload.

options
DataLakeFileUploadOptions

Optional parameters.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream, DataLakeFileUploadOptions, CancellationToken)

Source:
DataLakeFileClient.cs
Source:
DataLakeFileClient.cs

The UploadAsync(Stream, DataLakeFileUploadOptions, CancellationToken) operation creates and uploads content to a file. If the file already exists, its content will be overwritten, unless otherwise specified in the Conditions or alternatively use UploadAsync(Stream), UploadAsync(Stream, Boolean, CancellationToken).

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> UploadAsync (System.IO.Stream content, Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAsync : System.IO.Stream * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.UploadAsync : System.IO.Stream * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function UploadAsync (content As Stream, options As DataLakeFileUploadOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PathInfo))

Parameters

content
Stream

A Stream containing the content to upload.

options
DataLakeFileUploadOptions

Optional parameters.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(String)

Source:
DataLakeFileClient.cs
Source:
DataLakeFileClient.cs

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> UploadAsync (string path);
abstract member UploadAsync : string -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.UploadAsync : string -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function UploadAsync (path As String) As Task(Of Response(Of PathInfo))

Parameters

path
String

A file path containing the content to upload.

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream)

Source:
DataLakeFileClient.cs
Source:
DataLakeFileClient.cs

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> UploadAsync (System.IO.Stream content);
abstract member UploadAsync : System.IO.Stream -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.UploadAsync : System.IO.Stream -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function UploadAsync (content As Stream) As Task(Of Response(Of PathInfo))

Parameters

content
Stream

A Stream containing the content to upload.

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream, Boolean, CancellationToken)

Source:
DataLakeFileClient.cs
Source:
DataLakeFileClient.cs

The UploadAsync(Stream, Boolean, CancellationToken) operation creates and uploads content to a file.

If the overwrite parameter is not specified and the file already exists, then its content will not be overwritten. The request will be sent with If-None-Match Header with the value of the special wildcard. So if the file already exists a RequestFailedException is expected to be thrown.

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> UploadAsync (System.IO.Stream content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAsync : System.IO.Stream * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.UploadAsync : System.IO.Stream * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function UploadAsync (content As Stream, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PathInfo))

Parameters

content
Stream

A Stream containing the content to upload.

overwrite
Boolean

Whether the upload should overwrite an existing file. The default value is false.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to