Class CloudFileShare
- Namespace
- Microsoft.WindowsAzure.Storage.File
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents a share in the Microsoft Azure File service.
public class CloudFileShare
- Inheritance
-
CloudFileShare
- Inherited Members
Remarks
Shares hold directories, which are encapsulated as CloudFileDirectory objects, and directories hold files. Directories can also contain sub-directories.
Constructors
CloudFileShare(StorageUri, StorageCredentials)
Initializes a new instance of the CloudFileShare class.
public CloudFileShare(StorageUri shareAddress, StorageCredentials credentials)
Parameters
shareAddress
StorageUriThe absolute URI to the share.
credentials
StorageCredentialsA StorageCredentials object.
CloudFileShare(StorageUri, DateTimeOffset?, StorageCredentials)
Initializes a new instance of the CloudFileShare class.
public CloudFileShare(StorageUri shareAddress, DateTimeOffset? snapshotTime, StorageCredentials credentials)
Parameters
shareAddress
StorageUriThe absolute URI to the share.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the share is a snapshot.
credentials
StorageCredentialsA StorageCredentials object.
CloudFileShare(Uri)
Initializes a new instance of the CloudFileShare class.
public CloudFileShare(Uri shareAddress)
Parameters
shareAddress
UriThe absolute URI to the share.
CloudFileShare(Uri, StorageCredentials)
Initializes a new instance of the CloudFileShare class.
public CloudFileShare(Uri shareAddress, StorageCredentials credentials)
Parameters
shareAddress
UriThe absolute URI to the share.
credentials
StorageCredentialsA StorageCredentials object.
CloudFileShare(Uri, DateTimeOffset?, StorageCredentials)
Initializes a new instance of the CloudFileShare class.
public CloudFileShare(Uri shareAddress, DateTimeOffset? snapshotTime, StorageCredentials credentials)
Parameters
shareAddress
UriThe absolute URI to the share.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the share is a snapshot.
credentials
StorageCredentialsA StorageCredentials object.
Properties
IsSnapshot
Gets a value indicating whether this share is a snapshot.
public bool IsSnapshot { get; }
Property Value
- bool
true
if this share is a snapshot; otherwise,false
.
Metadata
Gets the share's metadata.
public IDictionary<string, string> Metadata { get; }
Property Value
- IDictionary<string, string>
The share's metadata.
Name
Gets the name of the share.
public string Name { get; }
Property Value
- string
The share's name.
Properties
Gets the share's system properties.
public FileShareProperties Properties { get; }
Property Value
- FileShareProperties
The share's properties.
ServiceClient
Gets the service client for the share.
public CloudFileClient ServiceClient { get; }
Property Value
- CloudFileClient
A client object that specifies the endpoint for the File service.
SnapshotQualifiedStorageUri
Gets the share's URI for both the primary and secondary locations, including query string information if the share is a snapshot.
public StorageUri SnapshotQualifiedStorageUri { get; }
Property Value
- StorageUri
An object of type StorageUri containing the share's URIs for both the primary and secondary locations, including snapshot query information if the share is a snapshot.
SnapshotQualifiedUri
Gets the absolute URI to the share, including query string information if the share is a snapshot.
public Uri SnapshotQualifiedUri { get; }
Property Value
- Uri
A System.Uri specifying the absolute URI to the share, including snapshot query information if the share is a snapshot.
SnapshotTime
Gets the date and time that the share snapshot was taken, if this share is a snapshot.
public DateTimeOffset? SnapshotTime { get; }
Property Value
- DateTimeOffset?
A DateTimeOffset containing the share's snapshot time if the share is a snapshot; otherwise,
null
.
Remarks
If the share is not a snapshot, the value of this property is null
.
StorageUri
Gets the list of URIs for all locations.
public StorageUri StorageUri { get; }
Property Value
- StorageUri
The list of URIs for all locations.
Uri
Gets the share's URI.
public Uri Uri { get; }
Property Value
- Uri
The absolute URI to the share.
Methods
BeginCreate(FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to create a share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreate(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginCreate(AsyncCallback, object)
Begins an asynchronous operation to create a share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreate(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginCreateIfNotExists(FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to create the share if it does not already exist.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateIfNotExists(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
Remarks
This API requires Create or Write permissions.
BeginCreateIfNotExists(AsyncCallback, object)
Begins an asynchronous request to create the share if it does not already exist.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateIfNotExists(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
Remarks
This API requires Create or Write permissions.
BeginDelete(AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDelete(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginDelete(DeleteShareSnapshotsOption, AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDelete(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
deleteSnapshotsOption
DeleteShareSnapshotsOptionA DeleteShareSnapshotsOption object indicating whether to only delete the share or delete the share and all snapshots.
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginDelete(AsyncCallback, object)
Begins an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDelete(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginDeleteIfExists(AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDeleteIfExists(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginDeleteIfExists(DeleteShareSnapshotsOption, AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDeleteIfExists(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
deleteSnapshotsOption
DeleteShareSnapshotsOptionA DeleteShareSnapshotsOption object indicating whether to only delete the share or delete the share and all snapshots.
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginDeleteIfExists(AsyncCallback, object)
Begins an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDeleteIfExists(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginExists(FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to check whether the share exists.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginExists(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginExists(AsyncCallback, object)
Begins an asynchronous request to check whether the share exists.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginExists(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginFetchAttributes(AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to retrieve the share's attributes.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginFetchAttributes(AsyncCallback, object)
Begins an asynchronous operation to retrieve the share's attributes.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginFetchAttributes(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginGetPermissions(AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to get the permissions settings for the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetPermissions(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginGetPermissions(AsyncCallback, object)
Begins an asynchronous request to get the permissions settings for the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetPermissions(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginGetStats(FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to get stats for the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetStats(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object to be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginGetStats(AsyncCallback, object)
Begins an asynchronous operation to get stats for the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetStats(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object to be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSetMetadata(AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to set user-defined metadata on the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginSetMetadata(AsyncCallback, object)
Begins an asynchronous operation to set user-defined metadata on the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetMetadata(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackThe callback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An IAsyncResult that references the asynchronous operation.
BeginSetPermissions(FileSharePermissions, AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to set permissions for the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetPermissions(FileSharePermissions permissions, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
permissions
FileSharePermissionsThe permissions to apply to the share.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSetPermissions(FileSharePermissions, AsyncCallback, object)
Begins an asynchronous request to set permissions for the share.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetPermissions(FileSharePermissions permissions, AsyncCallback callback, object state)
Parameters
permissions
FileSharePermissionsThe permissions to apply to the share.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSetProperties(AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to update the share's properties.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetProperties(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSetProperties(AsyncCallback, object)
Begins an asynchronous operation to update the share's properties.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetProperties(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSnapshot(AsyncCallback, object)
Begins an asynchronous operation to create a snapshot of the share.
[DoesServiceRequest]
public ICancellableAsyncResult BeginSnapshot(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSnapshot(IDictionary<string, string>, AccessCondition, FileRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to create a snapshot of the share.
[DoesServiceRequest]
public ICancellableAsyncResult BeginSnapshot(IDictionary<string, string> metadata, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request, or
null
.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Create(FileRequestOptions, OperationContext)
Creates the share.
[DoesServiceRequest]
public virtual void Create(FileRequestOptions requestOptions = null, OperationContext operationContext = null)
Parameters
requestOptions
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.
CreateAsync()
Returns a task that performs an asynchronous operation to create a share.
[DoesServiceRequest]
public virtual Task CreateAsync()
Returns
CreateAsync(FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous operation to create a share.
[DoesServiceRequest]
public virtual Task CreateAsync(FileRequestOptions options, OperationContext operationContext)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
CreateAsync(FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous operation to create a share.
[DoesServiceRequest]
public virtual Task CreateAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
CreateAsync(CancellationToken)
Returns a task that performs an asynchronous operation to create a share.
[DoesServiceRequest]
public virtual Task CreateAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
CreateIfNotExists(FileRequestOptions, OperationContext)
Creates the share if it does not already exist.
[DoesServiceRequest]
public virtual bool CreateIfNotExists(FileRequestOptions requestOptions = null, OperationContext operationContext = null)
Parameters
requestOptions
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- bool
true
if the share did not already exist and was created; otherwisefalse
.
Remarks
This API requires Create or Write permissions.
CreateIfNotExistsAsync()
Returns a task that performs an asynchronous request to create the share if it does not already exist.
[DoesServiceRequest]
public virtual Task<bool> CreateIfNotExistsAsync()
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
Remarks
This API requires Create or Write permissions.
CreateIfNotExistsAsync(FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous request to create the share if it does not already exist.
[DoesServiceRequest]
public virtual Task<bool> CreateIfNotExistsAsync(FileRequestOptions options, OperationContext operationContext)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
Remarks
This API requires Create or Write permissions.
CreateIfNotExistsAsync(FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous request to create the share if it does not already exist.
[DoesServiceRequest]
public virtual Task<bool> CreateIfNotExistsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
Remarks
This API requires Create or Write permissions.
CreateIfNotExistsAsync(CancellationToken)
Returns a task that performs an asynchronous request to create the share if it does not already exist.
[DoesServiceRequest]
public virtual Task<bool> CreateIfNotExistsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
Remarks
This API requires Create or Write permissions.
Delete(AccessCondition, FileRequestOptions, OperationContext)
Deletes the share.
[DoesServiceRequest]
public virtual void Delete(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Delete(DeleteShareSnapshotsOption, AccessCondition, FileRequestOptions, OperationContext)
Deletes the share.
[DoesServiceRequest]
public virtual void Delete(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
deleteSnapshotsOption
DeleteShareSnapshotsOptionA DeleteShareSnapshotsOption object indicating whether to only delete the share or delete the share and all snapshots.
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
DeleteAsync()
Returns a task that performs an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual Task DeleteAsync()
Returns
DeleteAsync(AccessCondition, FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual Task DeleteAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
DeleteAsync(AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual Task DeleteAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DeleteAsync(DeleteShareSnapshotsOption, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual Task DeleteAsync(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
deleteSnapshotsOption
DeleteShareSnapshotsOptionA DeleteShareSnapshotsOption object indicating whether to only delete the share or delete the share and all snapshots.
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DeleteAsync(CancellationToken)
Returns a task that performs an asynchronous operation to delete a share.
[DoesServiceRequest]
public virtual Task DeleteAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DeleteIfExists(AccessCondition, FileRequestOptions, OperationContext)
Deletes the share if it already exists.
[DoesServiceRequest]
public virtual bool DeleteIfExists(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- bool
true
if the share did not already exist and was created; otherwisefalse
.
DeleteIfExists(DeleteShareSnapshotsOption, AccessCondition, FileRequestOptions, OperationContext)
Deletes the share if it already exists.
[DoesServiceRequest]
public virtual bool DeleteIfExists(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
deleteSnapshotsOption
DeleteShareSnapshotsOptionA DeleteShareSnapshotsOption object indicating whether to only delete the share or delete the share and all snapshots.
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- bool
true
if the share did not already exist and was created; otherwisefalse
.
DeleteIfExistsAsync()
Returns a task that performs an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual Task<bool> DeleteIfExistsAsync()
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
DeleteIfExistsAsync(AccessCondition, FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual Task<bool> DeleteIfExistsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
DeleteIfExistsAsync(AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual Task<bool> DeleteIfExistsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
DeleteIfExistsAsync(DeleteShareSnapshotsOption, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual Task<bool> DeleteIfExistsAsync(DeleteShareSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
deleteSnapshotsOption
DeleteShareSnapshotsOptionA DeleteShareSnapshotsOption object indicating whether to only delete the share or delete the share and all snapshots.
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
DeleteIfExistsAsync(CancellationToken)
Returns a task that performs an asynchronous request to delete the share if it already exists.
[DoesServiceRequest]
public virtual Task<bool> DeleteIfExistsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
EndCreate(IAsyncResult)
Ends an asynchronous operation to create a share.
public virtual void EndCreate(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndCreateIfNotExists(IAsyncResult)
Returns the result of an asynchronous request to create the share if it does not already exist.
public virtual bool EndCreateIfNotExists(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- bool
true
if the share did not already exist and was created; otherwise,false
.
EndDelete(IAsyncResult)
Ends an asynchronous operation to delete a share.
public virtual void EndDelete(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndDeleteIfExists(IAsyncResult)
Returns the result of an asynchronous request to delete the share if it already exists.
public virtual bool EndDeleteIfExists(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- bool
true
if the share did not already exist and was created; otherwise,false
.
EndExists(IAsyncResult)
Returns the asynchronous result of the request to check whether the share exists.
public virtual bool EndExists(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- bool
true
if the share exists.
EndFetchAttributes(IAsyncResult)
Ends an asynchronous operation to retrieve the share's attributes.
public virtual void EndFetchAttributes(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndGetPermissions(IAsyncResult)
Returns the asynchronous result of the request to get the permissions settings for the share.
public virtual FileSharePermissions EndGetPermissions(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- FileSharePermissions
A FileSharePermissions object.
EndGetStats(IAsyncResult)
Ends an asynchronous operation to get stats for the share.
public virtual ShareStats EndGetStats(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- ShareStats
A ShareStats object.
EndSetMetadata(IAsyncResult)
Ends an asynchronous request operation to set user-defined metadata on the share.
public virtual void EndSetMetadata(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSetPermissions(IAsyncResult)
Returns the result of an asynchronous request to set permissions for the share.
public virtual void EndSetPermissions(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSetProperties(IAsyncResult)
Ends an asynchronous operation to update the share's properties.
public virtual void EndSetProperties(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSnapshot(IAsyncResult)
Ends an asynchronous operation to create a snapshot of the share.
public CloudFileShare EndSnapshot(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- CloudFileShare
A CloudFileShare object that is a share snapshot.
Exists(FileRequestOptions, OperationContext)
Checks whether the share exists.
[DoesServiceRequest]
public virtual bool Exists(FileRequestOptions requestOptions = null, OperationContext operationContext = null)
Parameters
requestOptions
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- bool
true
if the share exists.
ExistsAsync()
Returns a task that performs an asynchronous request to check whether the share exists.
[DoesServiceRequest]
public virtual Task<bool> ExistsAsync()
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
ExistsAsync(FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous request to check whether the share exists.
[DoesServiceRequest]
public virtual Task<bool> ExistsAsync(FileRequestOptions options, OperationContext operationContext)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
ExistsAsync(FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous request to check whether the share exists.
[DoesServiceRequest]
public virtual Task<bool> ExistsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
ExistsAsync(CancellationToken)
Returns a task that performs an asynchronous request to check whether the share exists.
[DoesServiceRequest]
public virtual Task<bool> ExistsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<bool>
A Task<TResult> object that represents the current operation.
FetchAttributes(AccessCondition, FileRequestOptions, OperationContext)
Retrieves the share's attributes.
[DoesServiceRequest]
public virtual void FetchAttributes(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
FetchAttributesAsync()
Returns a task that performs an asynchronous operation to retrieve the share's attributes.
[DoesServiceRequest]
public virtual Task FetchAttributesAsync()
Returns
FetchAttributesAsync(AccessCondition, FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous operation to retrieve the share's attributes.
[DoesServiceRequest]
public virtual Task FetchAttributesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
FetchAttributesAsync(AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous operation to retrieve the share's attributes.
[DoesServiceRequest]
public virtual Task FetchAttributesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
FetchAttributesAsync(CancellationToken)
Returns a task that performs an asynchronous operation to retrieve the share's attributes.
[DoesServiceRequest]
public virtual Task FetchAttributesAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
GetPermissions(AccessCondition, FileRequestOptions, OperationContext)
Gets the permissions settings for the share.
[DoesServiceRequest]
public virtual FileSharePermissions GetPermissions(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- FileSharePermissions
A FileSharePermissions object.
GetPermissionsAsync()
Initiates an asynchronous operation that gets the permissions settings for the share.
[DoesServiceRequest]
public virtual Task<FileSharePermissions> GetPermissionsAsync()
Returns
- Task<FileSharePermissions>
A Task<TResult> object of type FileSharePermissions that represents the asynchronous operation.
GetPermissionsAsync(AccessCondition, FileRequestOptions, OperationContext)
Initiates an asynchronous operation that gets the permissions settings for the share.
[DoesServiceRequest]
public virtual Task<FileSharePermissions> GetPermissionsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<FileSharePermissions>
A Task<TResult> object of type FileSharePermissions that represents the asynchronous operation.
GetPermissionsAsync(AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation that gets the permissions settings for the share.
[DoesServiceRequest]
public virtual Task<FileSharePermissions> GetPermissionsAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<FileSharePermissions>
A Task<TResult> object of type FileSharePermissions that represents the asynchronous operation.
GetPermissionsAsync(CancellationToken)
Initiates an asynchronous operation that gets the permissions settings for the share.
[DoesServiceRequest]
public virtual Task<FileSharePermissions> GetPermissionsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<FileSharePermissions>
A Task<TResult> object of type FileSharePermissions that represents the asynchronous operation.
GetRootDirectoryReference()
Returns a reference to the root directory for this share.
public virtual CloudFileDirectory GetRootDirectoryReference()
Returns
- CloudFileDirectory
A reference to the root directory.
GetSharedAccessSignature(SharedAccessFilePolicy)
Returns a shared access signature for the share.
public string GetSharedAccessSignature(SharedAccessFilePolicy policy)
Parameters
policy
SharedAccessFilePolicyA SharedAccessFilePolicy object specifying the access policy for the shared access signature.
Returns
- string
A shared access signature, as a URI query string.
Remarks
The query string returned includes the leading question mark.
GetSharedAccessSignature(SharedAccessFilePolicy, string)
Returns a shared access signature for the share.
public string GetSharedAccessSignature(SharedAccessFilePolicy policy, string groupPolicyIdentifier)
Parameters
policy
SharedAccessFilePolicyA SharedAccessFilePolicy object specifying the access policy for the shared access signature.
groupPolicyIdentifier
stringA share-level access policy.
Returns
- string
A shared access signature, as a URI query string.
Remarks
The query string returned includes the leading question mark.
GetSharedAccessSignature(SharedAccessFilePolicy, string, SharedAccessProtocol?, IPAddressOrRange)
Returns a shared access signature for the share.
public string GetSharedAccessSignature(SharedAccessFilePolicy policy, string groupPolicyIdentifier, SharedAccessProtocol? protocols, IPAddressOrRange ipAddressOrRange)
Parameters
policy
SharedAccessFilePolicyA SharedAccessFilePolicy object specifying the access policy for the shared access signature.
groupPolicyIdentifier
stringA share-level access policy.
protocols
SharedAccessProtocol?The allowed protocols (https only, or http and https). Null if you don't want to restrict protocol.
ipAddressOrRange
IPAddressOrRangeThe allowed IP address or IP address range. Null if you don't want to restrict based on IP address.
Returns
- string
A shared access signature, as a URI query string.
Remarks
The query string returned includes the leading question mark.
GetStats(FileRequestOptions, OperationContext)
Gets stats for the share.
[DoesServiceRequest]
public virtual ShareStats GetStats(FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- ShareStats
A ShareStats object.
GetStatsAsync()
Initiates an asynchronous operation to get stats for the share.
[DoesServiceRequest]
public virtual Task<ShareStats> GetStatsAsync()
Returns
- Task<ShareStats>
A Task<TResult> object of type ShareStats that represents the asynchronous operation.
GetStatsAsync(FileRequestOptions, OperationContext)
Initiates an asynchronous operation to get stats for the share.
[DoesServiceRequest]
public virtual Task<ShareStats> GetStatsAsync(FileRequestOptions options, OperationContext operationContext)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<ShareStats>
A Task<TResult> object of type ShareStats that represents the asynchronous operation.
GetStatsAsync(FileRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to get stats for the share.
[DoesServiceRequest]
public virtual Task<ShareStats> GetStatsAsync(FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<ShareStats>
A Task<TResult> object of type ShareStats that represents the asynchronous operation.
GetStatsAsync(CancellationToken)
Initiates an asynchronous operation to get stats for the share.
[DoesServiceRequest]
public virtual Task<ShareStats> GetStatsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<ShareStats>
A Task<TResult> object of type ShareStats that represents the asynchronous operation.
SetMetadata(AccessCondition, FileRequestOptions, OperationContext)
Sets the share's user-defined metadata.
[DoesServiceRequest]
public virtual void SetMetadata(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsAn FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
SetMetadataAsync()
Returns a task that performs an asynchronous operation to set user-defined metadata on the share.
[DoesServiceRequest]
public virtual Task SetMetadataAsync()
Returns
SetMetadataAsync(AccessCondition, FileRequestOptions, OperationContext)
Returns a task that performs an asynchronous operation to set user-defined metadata on the share.
[DoesServiceRequest]
public virtual Task SetMetadataAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
SetMetadataAsync(AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Returns a task that performs an asynchronous operation to set user-defined metadata on the share.
[DoesServiceRequest]
public virtual Task SetMetadataAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the share. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetMetadataAsync(CancellationToken)
Returns a task that performs an asynchronous operation to set user-defined metadata on the share.
[DoesServiceRequest]
public virtual Task SetMetadataAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetPermissions(FileSharePermissions, AccessCondition, FileRequestOptions, OperationContext)
Sets permissions for the share.
[DoesServiceRequest]
public virtual void SetPermissions(FileSharePermissions permissions, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
permissions
FileSharePermissionsA FileSharePermissions object.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
SetPermissionsAsync(FileSharePermissions)
Initiates an asynchronous operation that sets permissions for the share.
[DoesServiceRequest]
public virtual Task SetPermissionsAsync(FileSharePermissions permissions)
Parameters
permissions
FileSharePermissionsThe permissions to apply to the share.
Returns
SetPermissionsAsync(FileSharePermissions, AccessCondition, FileRequestOptions, OperationContext)
Initiates an asynchronous operation that sets permissions for the share.
[DoesServiceRequest]
public virtual Task SetPermissionsAsync(FileSharePermissions permissions, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
permissions
FileSharePermissionsThe permissions to apply to the share.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
SetPermissionsAsync(FileSharePermissions, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation that sets permissions for the share.
[DoesServiceRequest]
public virtual Task SetPermissionsAsync(FileSharePermissions permissions, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
permissions
FileSharePermissionsThe permissions to apply to the share.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetPermissionsAsync(FileSharePermissions, CancellationToken)
Initiates an asynchronous operation that sets permissions for the share.
[DoesServiceRequest]
public virtual Task SetPermissionsAsync(FileSharePermissions permissions, CancellationToken cancellationToken)
Parameters
permissions
FileSharePermissionsThe permissions to apply to the share.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetProperties(AccessCondition, FileRequestOptions, OperationContext)
Updates the share's properties.
[DoesServiceRequest]
public virtual void SetProperties(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
SetPropertiesAsync()
Initiates an asynchronous operation to update the share's properties.
[DoesServiceRequest]
public virtual Task SetPropertiesAsync()
Returns
SetPropertiesAsync(AccessCondition, FileRequestOptions, OperationContext)
Initiates an asynchronous operation to update the share's properties.
[DoesServiceRequest]
public virtual Task SetPropertiesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
SetPropertiesAsync(AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to update the share's properties.
[DoesServiceRequest]
public virtual Task SetPropertiesAsync(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetPropertiesAsync(CancellationToken)
Initiates an asynchronous operation to update the share's properties.
[DoesServiceRequest]
public virtual Task SetPropertiesAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
Snapshot(IDictionary<string, string>, AccessCondition, FileRequestOptions, OperationContext)
Creates a snapshot of the share.
[DoesServiceRequest]
public CloudFileShare Snapshot(IDictionary<string, string> metadata = null, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request, or
null
. Ifnull
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- CloudFileShare
A CloudFileShare object that is a share snapshot.
SnapshotAsync()
Initiates an asynchronous operation to create a snapshot of the share.
[DoesServiceRequest]
public Task<CloudFileShare> SnapshotAsync()
Returns
- Task<CloudFileShare>
A Task<TResult> object of type CloudFileShare that represents the asynchronous operation.
SnapshotAsync(IDictionary<string, string>, AccessCondition, FileRequestOptions, OperationContext)
Initiates an asynchronous operation to create a snapshot of the share.
[DoesServiceRequest]
public Task<CloudFileShare> SnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<CloudFileShare>
A Task<TResult> object of type CloudFileShare that represents the asynchronous operation.
SnapshotAsync(IDictionary<string, string>, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to create a snapshot of the share.
[DoesServiceRequest]
public Task<CloudFileShare> SnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
FileRequestOptionsA FileRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudFileShare>
A Task<TResult> object of type CloudFileShare that represents the asynchronous operation.
SnapshotAsync(CancellationToken)
Initiates an asynchronous operation to create a snapshot of the share.
[DoesServiceRequest]
public Task<CloudFileShare> SnapshotAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudFileShare>
A Task<TResult> object of type CloudFileShare that represents the asynchronous operation.