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);

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

Prodotto Versioni
Azure SDK for .NET Latest, Preview