DataLakeFileClient.Upload 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.
Overloads
Upload(String, Boolean, CancellationToken) |
The Upload(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. |
Upload(String, DataLakeFileUploadOptions, CancellationToken) |
The Upload(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 Upload(Stream), Upload(Stream, Boolean, CancellationToken). For more information, see Update Path. |
Upload(String) |
The Upload(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. |
Upload(Stream, DataLakeFileUploadOptions, CancellationToken) |
The Upload(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 Upload(Stream), Upload(Stream, Boolean, CancellationToken). For more information, see Update Path. |
Upload(Stream) |
The Upload(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. |
Upload(Stream, Boolean, CancellationToken) |
The Upload(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. |
Upload(String, Boolean, CancellationToken)
- Source:
- DataLakeFileClient.cs
- Source:
- DataLakeFileClient.cs
The Upload(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 Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo> Upload (string path, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member Upload : string * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.Upload : string * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function Upload (path As String, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As 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
Upload(String, DataLakeFileUploadOptions, CancellationToken)
- Source:
- DataLakeFileClient.cs
- Source:
- DataLakeFileClient.cs
The Upload(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 Upload(Stream), Upload(Stream, Boolean, CancellationToken).
For more information, see Update Path.
public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo> Upload (string path, Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member Upload : string * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.Upload : string * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function Upload (path As String, options As DataLakeFileUploadOptions, Optional cancellationToken As CancellationToken = Nothing) As 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
Upload(String)
- Source:
- DataLakeFileClient.cs
- Source:
- DataLakeFileClient.cs
The Upload(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 Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo> Upload (string path);
abstract member Upload : string -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.Upload : string -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function Upload (path As String) As 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
Upload(Stream, DataLakeFileUploadOptions, CancellationToken)
- Source:
- DataLakeFileClient.cs
- Source:
- DataLakeFileClient.cs
The Upload(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 Upload(Stream), Upload(Stream, Boolean, CancellationToken).
For more information, see Update Path.
public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo> Upload (System.IO.Stream content, Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member Upload : System.IO.Stream * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.Upload : System.IO.Stream * Azure.Storage.Files.DataLake.Models.DataLakeFileUploadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function Upload (content As Stream, options As DataLakeFileUploadOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PathInfo)
Parameters
- 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 file.
Remarks
A RequestFailedException will be thrown if a failure occurs.
Applies to
Upload(Stream)
- Source:
- DataLakeFileClient.cs
- Source:
- DataLakeFileClient.cs
The Upload(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 Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo> Upload (System.IO.Stream content);
abstract member Upload : System.IO.Stream -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.Upload : System.IO.Stream -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function Upload (content As Stream) As Response(Of PathInfo)
Parameters
Returns
A Response<T> describing the state of the updated file.
Remarks
A RequestFailedException will be thrown if a failure occurs.
Applies to
Upload(Stream, Boolean, CancellationToken)
- Source:
- DataLakeFileClient.cs
- Source:
- DataLakeFileClient.cs
The Upload(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 Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo> Upload (System.IO.Stream content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member Upload : System.IO.Stream * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.Upload : System.IO.Stream * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function Upload (content As Stream, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PathInfo)
Parameters
- 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 file.
Remarks
A RequestFailedException will be thrown if a failure occurs.
Applies to
Azure SDK for .NET