다음을 통해 공유


ShareFileClient.Create Method

Definition

Creates a new file or replaces an existing file.

For more information, see Create File.

public virtual Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo> Create (long maxSize, Azure.Storage.Files.Shares.Models.ShareFileCreateOptions options = default, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Create : int64 * Azure.Storage.Files.Shares.Models.ShareFileCreateOptions * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>
override this.Create : int64 * Azure.Storage.Files.Shares.Models.ShareFileCreateOptions * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>
Public Overridable Function Create (maxSize As Long, Optional options As ShareFileCreateOptions = Nothing, Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ShareFileInfo)

Parameters

maxSize
Int64

Required. Specifies the maximum size for the file in bytes. The max supported file size is 4 TiB.

options
ShareFileCreateOptions

Optional parameters.

conditions
ShareFileRequestConditions

Optional ShareFileRequestConditions to add conditions on creating the file.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the state of the file.

Remarks

This method only initializes the file. To add content, use Azure.Storage.Files.Shares.ShareFileClient.UploadRangeAsync(Azure.HttpRange,System.IO.Stream,System.Byte[],System.IProgress{System.Int64},Azure.Storage.Files.Shares.Models.ShareFileRequestConditions,System.Threading.CancellationToken).

Applies to