共用方式為


CloudFile.UploadText Method

Definition

Uploads a string of text to a file. If the file already exists on the service, it will be overwritten.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual void UploadText (string content, System.Text.Encoding encoding = default, Microsoft.Azure.Storage.AccessCondition accessCondition = default, Microsoft.Azure.Storage.File.FileRequestOptions options = default, Microsoft.Azure.Storage.OperationContext operationContext = default);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member UploadText : string * System.Text.Encoding * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
override this.UploadText : string * System.Text.Encoding * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
Public Overridable Sub UploadText (content As String, Optional encoding As Encoding = Nothing, Optional accessCondition As AccessCondition = Nothing, Optional options As FileRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing)

Parameters

content
String

The text to upload.

encoding
Encoding

An object that indicates the text encoding to use. If null, UTF-8 will be used.

accessCondition
AccessCondition

An AccessCondition object that represents the access conditions for the file.

options
FileRequestOptions

A FileRequestOptions object that specifies additional options for the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

Attributes

Applies to