<PackageReference Include="Microsoft.Azure.Storage.File" Version="11.1.6" />

Microsoft.Azure.Storage.File.CloudFileShare

public class CloudFileShare
Represents a share in the Microsoft Azure File service.
public bool IsSnapshot { get; }

Gets a value indicating whether this share is a snapshot.

public IDictionary<string, string> Metadata { get; }

Gets the share's metadata.

public string Name { get; }

Gets the name of the share.

Gets the share's system properties.

Gets the service client for the share.

public StorageUri SnapshotQualifiedStorageUri { get; }

Gets the share's URI for both the primary and secondary locations, including query string information if the share is a snapshot.

public Uri SnapshotQualifiedUri { get; }

Gets the absolute URI to the share, including query string information if the share is a snapshot.

public DateTimeOffset? SnapshotTime { get; }

Gets the date and time that the share snapshot was taken, if this share is a snapshot.

public StorageUri StorageUri { get; }

Gets the list of URIs for all locations.

public Uri Uri { get; }

Gets the share's URI.

public CloudFileShare(Uri shareAddress)

Initializes a new instance of the CloudFileShare class.

public CloudFileShare(Uri shareAddress, StorageCredentials credentials)

Initializes a new instance of the CloudFileShare class.

public CloudFileShare(Uri shareAddress, DateTimeOffset? snapshotTime, StorageCredentials credentials)

Initializes a new instance of the CloudFileShare class.

public CloudFileShare(StorageUri shareAddress, StorageCredentials credentials)

Initializes a new instance of the CloudFileShare class.

public CloudFileShare(StorageUri shareAddress, DateTimeOffset? snapshotTime, StorageCredentials credentials)

Initializes a new instance of the CloudFileShare class.

public virtual Task CreateAsync()

Creates the share.

public virtual Task CreateAsync(FileRequestOptions options, OperationContext operationContext)

Creates the share.

public virtual Task CreateAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Creates the share.

public virtual Task<string> CreateFilePermissionAsync(string permission, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Creates a File Permission.

public virtual Task<bool> CreateIfNotExistsAsync()

Creates the share if it does not already exist.

public virtual Task<bool> CreateIfNotExistsAsync(FileRequestOptions options, OperationContext operationContext)

Creates the share if it does not already exist.

public virtual Task<bool> CreateIfNotExistsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Creates the share if it does not already exist.

public virtual Task DeleteAsync()

Deletes the share.

public virtual Task DeleteAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Deletes the share.

public virtual Task DeleteAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Deletes the share.

public virtual Task DeleteAsync(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Deletes the share.

public virtual Task<bool> DeleteIfExistsAsync()

Deletes the share if it already exists.

public virtual Task<bool> DeleteIfExistsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Deletes the share if it already exists.

public virtual Task<bool> DeleteIfExistsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Deletes the share if it already exists.

public virtual Task<bool> DeleteIfExistsAsync(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Deletes the share if it already exists.

public virtual Task<bool> ExistsAsync()

Checks existence of the share.

public virtual Task<bool> ExistsAsync(FileRequestOptions options, OperationContext operationContext)

Checks existence of the share.

public virtual Task<bool> ExistsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Checks existence of the share.

public virtual Task FetchAttributesAsync()

Retrieves the share's attributes.

public virtual Task FetchAttributesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Retrieves the share's attributes.

public virtual Task FetchAttributesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Retrieves the share's attributes.

public virtual Task<string> GetFilePermissionAsync(string filePermissionKey, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Gets a File Permission.

Gets the permissions settings for the share.

public virtual Task<FileSharePermissions> GetPermissionsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Gets the permissions settings for the share.

public virtual Task<FileSharePermissions> GetPermissionsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Gets the permissions settings for the share.

Returns a reference to the root directory for this share.

Returns a shared access signature for the share.

public string GetSharedAccessSignature(SharedAccessFilePolicy policy, string groupPolicyIdentifier)

Returns a shared access signature for the share.

public string GetSharedAccessSignature(SharedAccessFilePolicy policy, string groupPolicyIdentifier, SharedAccessProtocol? protocols, IPAddressOrRange ipAddressOrRange)

Returns a shared access signature for the share.

public virtual Task<ShareStats> GetStatsAsync()

Gets the stats of share.

public virtual Task<ShareStats> GetStatsAsync(FileRequestOptions options, OperationContext operationContext)

Gets the stats of the share.

public virtual Task<ShareStats> GetStatsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Gets the stats of the share.

public virtual Task SetMetadataAsync()

Sets the share's user-defined metadata.

public virtual Task SetMetadataAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Sets the share's user-defined metadata.

public virtual Task SetMetadataAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Sets the share's user-defined metadata.

public virtual Task SetPermissionsAsync(FileSharePermissions permissions)

Sets permissions for the share.

public virtual Task SetPermissionsAsync(FileSharePermissions permissions, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Sets permissions for the share.

public virtual Task SetPermissionsAsync(FileSharePermissions permissions, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Sets permissions for the share.

public virtual Task SetPropertiesAsync()

Updates the share's properties.

public virtual Task SetPropertiesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Updates the share's properties.

public virtual Task SetPropertiesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Updates the share's properties.

public virtual Task<CloudFileShare> SnapshotAsync()

Creates a snapshot of the share.

public virtual Task<CloudFileShare> SnapshotAsync(CancellationToken cancellationToken)

Creates a snapshot of the share.

public virtual Task<CloudFileShare> SnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)

Creates a snapshot of the share.

public virtual Task<CloudFileShare> SnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Creates a snapshot of the share.