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

Microsoft.Azure.Storage.File.CloudFileDirectory

Represents a directory of files, designated by a delimiter character.
public string FilePermission { get; set; }

Gets or sets the file permission for this directory. This field will be null after Directory.Create, Directory.SetProperties, Directory.GetProperties, and Directory.Get calls.

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

Gets the user-defined metadata for the directory.

public string Name { get; }

Gets the name of the directory.

public CloudFileDirectory Parent { get; }

Gets a CloudFileDirectory object that represents the parent directory for the directory.

Gets a FileDirectoryProperties object that represents the directory's system properties.

Gets a CloudFileClient object that specifies the endpoint for the File service.

public CloudFileShare Share { get; }

Gets a CloudFileShare object that represents the share for the directory.

public StorageUri SnapshotQualifiedStorageUri { get; }

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

public Uri SnapshotQualifiedUri { get; }

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

public StorageUri StorageUri { get; }

Gets the file directory's URIs for all locations.

public Uri Uri { get; }

Gets the directory's URI for the primary location.

public CloudFileDirectory(Uri directoryAbsoluteUri)

Initializes a new instance of the CloudFileDirectory class using an absolute URI to the directory.

public CloudFileDirectory(Uri directoryAbsoluteUri, StorageCredentials credentials)

Initializes a new instance of the CloudFileDirectory class using an absolute URI to the directory.

public CloudFileDirectory(StorageUri directoryAbsoluteUri, StorageCredentials credentials)

Initializes a new instance of the CloudFileDirectory class using an absolute URI to the directory.

public virtual ICancellableAsyncResult BeginCloseAllHandlesSegmented(FileContinuationToken token, bool? recursive, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to close all SMB handles on this directory.

public virtual ICancellableAsyncResult BeginCloseHandleSegmented(string handleId, FileContinuationToken token, bool? recursive, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to close the specified SMB handle on this directory.

public virtual ICancellableAsyncResult BeginCreate(AsyncCallback callback, object state)

Begins an asynchronous operation to create a directory.

public virtual ICancellableAsyncResult BeginCreate(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to create a directory.

public virtual ICancellableAsyncResult BeginCreateIfNotExists(AsyncCallback callback, object state)

Begins an asynchronous request to create the directory if it does not already exist.

public virtual ICancellableAsyncResult BeginCreateIfNotExists(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous request to create the directory if it does not already exist.

public virtual ICancellableAsyncResult BeginDelete(AsyncCallback callback, object state)

Begins an asynchronous operation to delete a directory.

public virtual ICancellableAsyncResult BeginDelete(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to delete a directory.

public virtual ICancellableAsyncResult BeginDeleteIfExists(AsyncCallback callback, object state)

Begins an asynchronous request to delete the directory if it already exists.

public virtual ICancellableAsyncResult BeginDeleteIfExists(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous request to delete the directory if it already exists.

public virtual ICancellableAsyncResult BeginExists(AsyncCallback callback, object state)

Begins an asynchronous request to check whether the directory exists.

public virtual ICancellableAsyncResult BeginExists(FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous request to check whether the directory exists.

public virtual ICancellableAsyncResult BeginFetchAttributes(AsyncCallback callback, object state)

Begins an asynchronous operation to populate the directory's properties.

public virtual ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to populate the directory's properties and metadata.

public virtual ICancellableAsyncResult BeginListFilesAndDirectoriesSegmented(FileContinuationToken currentToken, AsyncCallback callback, object state)

Begins an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual ICancellableAsyncResult BeginListFilesAndDirectoriesSegmented(int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to return a result segment containing a collection of file items in the share.

public ICancellableAsyncResult BeginListFilesAndDirectoriesSegmented(string prefix, int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual ICancellableAsyncResult BeginListHandlesSegmented(FileContinuationToken token, int? maxResults, bool? recursive, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to get the SMB handles open on this directory.

public virtual ICancellableAsyncResult BeginSetMetadata(AsyncCallback callback, object state)

Begins an asynchronous operation to update the directory's metadata.

public virtual ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Begins an asynchronous operation to update the directory's metadata.

public virtual CloseFileHandleResultSegment CloseAllHandlesSegmented(FileContinuationToken token = null, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Closes all SMB handles on this file.

public virtual Task<CloseFileHandleResultSegment> CloseAllHandlesSegmentedAsync(FileContinuationToken token = null, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Returns a task that performs an asynchronous operation to close all SMB handles on this directory.

public virtual CloseFileHandleResultSegment CloseHandleSegmented(string handleId, FileContinuationToken token = null, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Closes the specified SMB handle on this directory.

public virtual CloseFileHandleResultSegment CloseHandleSegmented(ulong handleId, FileContinuationToken token = null, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Closes the specified SMB handle on this directory.

public virtual Task<CloseFileHandleResultSegment> CloseHandleSegmentedAsync(string handleId, FileContinuationToken token = null, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Returns a task that performs an asynchronous operation to close the specified SMB handle on this directory.

public virtual Task<CloseFileHandleResultSegment> CloseHandleSegmentedAsync(ulong handleId, FileContinuationToken token = null, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Returns a task that performs an asynchronous operation to close the specified SMB handle on this directory.

public virtual void Create(FileRequestOptions requestOptions = null, OperationContext operationContext = null)

Creates the directory.

public virtual Task CreateAsync()

Returns a task that performs an asynchronous operation to create a directory.

public virtual Task CreateAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to create a directory.

public virtual Task CreateAsync(FileRequestOptions options, OperationContext operationContext)

Returns a task that performs an asynchronous operation to create a directory.

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

Returns a task that performs an asynchronous operation to create a directory.

public virtual bool CreateIfNotExists(FileRequestOptions requestOptions = null, OperationContext operationContext = null)

Creates the directory if it does not already exist.

public virtual Task<bool> CreateIfNotExistsAsync()

Returns a task that performs an asynchronous request to create the directory if it does not already exist.

public virtual Task<bool> CreateIfNotExistsAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous request to create the directory if it does not already exist.

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

Returns a task that performs an asynchronous request to create the directory if it does not already exist.

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

Returns a task that performs an asynchronous request to create the directory if it does not already exist.

public virtual void Delete(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Deletes the directory.

public virtual Task DeleteAsync()

Returns a task that performs an asynchronous operation to delete a directory.

public virtual Task DeleteAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to delete a directory.

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

Returns a task that performs an asynchronous operation to delete a directory.

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

Returns a task that performs an asynchronous operation to delete a directory.

public virtual bool DeleteIfExists(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Deletes the directory if it already exists.

public virtual Task<bool> DeleteIfExistsAsync()

Returns a task that performs an asynchronous request to delete the directory if it already exists.

public virtual Task<bool> DeleteIfExistsAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous request to delete the directory if it already exists.

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

Returns a task that performs an asynchronous request to delete the directory if it already exists.

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

Returns a task that performs an asynchronous request to delete the directory if it already exists.

Ends an asynchronous operation to close all SMB handles on this directory.

Ends an asynchronous operation to close the specified SMB handle on this directory.

public virtual void EndCreate(IAsyncResult asyncResult)

Ends an asynchronous operation to create a directory.

public virtual bool EndCreateIfNotExists(IAsyncResult asyncResult)

Returns the result of an asynchronous request to create the directory if it does not already exist.

public virtual void EndDelete(IAsyncResult asyncResult)

Ends an asynchronous operation to delete a directory.

public virtual bool EndDeleteIfExists(IAsyncResult asyncResult)

Returns the result of an asynchronous request to delete the directory if it already exists.

public virtual bool EndExists(IAsyncResult asyncResult)

Returns the asynchronous result of the request to check whether the directory exists.

public virtual void EndFetchAttributes(IAsyncResult asyncResult)

Ends an asynchronous operation to populate the directory's properties and metadata.

Ends an asynchronous operation to return a result segment containing a collection of file items in the share.

Ends an asynchronous operation to get the SMB handles open on this file.

public virtual void EndSetMetadata(IAsyncResult asyncResult)

Ends an asynchronous operation to update the directory's metadata.

public virtual bool Exists(FileRequestOptions requestOptions = null, OperationContext operationContext = null)

Checks whether the directory exists.

public virtual Task<bool> ExistsAsync()

Returns a task that performs an asynchronous request to check whether the directory exists.

public virtual Task<bool> ExistsAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous request to check whether the directory exists.

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

Returns a task that performs an asynchronous request to check whether the directory exists.

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

Returns a task that performs an asynchronous request to check whether the directory exists.

public virtual void FetchAttributes(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Populates a directory's properties.

public virtual Task FetchAttributesAsync()

Returns a task that performs an asynchronous operation to populate the directory's properties and metadata.

public virtual Task FetchAttributesAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to populate the directory's properties and metadata.

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

Returns a task that performs an asynchronous operation to populate the directory's properties and metadata.

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

Returns a task that performs an asynchronous operation to populate the directory's properties and metadata.

public virtual CloudFileDirectory GetDirectoryReference(string itemName)

Returns a CloudFileDirectory object that represents a subdirectory within this directory.

public virtual CloudFile GetFileReference(string fileName)

Returns a CloudFile object that represents a file in this directory.

public virtual IEnumerable<IListFileItem> ListFilesAndDirectories(FileRequestOptions options = null, OperationContext operationContext = null)

Returns an enumerable collection of the files in the share, which are retrieved lazily.

public IEnumerable<IListFileItem> ListFilesAndDirectories(string prefix, FileRequestOptions options = null, OperationContext operationContext = null)

Returns an enumerable collection of the files in the share, which are retrieved lazily.

Returns a result segment containing a collection of file items in the share.

public virtual FileResultSegment ListFilesAndDirectoriesSegmented(int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext)

Returns a result segment containing a collection of file items in the share.

public FileResultSegment ListFilesAndDirectoriesSegmented(string prefix, int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext)

Returns a result segment containing a collection of file items in the share.

Returns a task that performs an asynchronous operation to return a result segment containing a collection of file items in the share.

Returns a task that performs an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual Task<FileResultSegment> ListFilesAndDirectoriesSegmentedAsync(string prefix, FileContinuationToken currentToken, CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual Task<FileResultSegment> ListFilesAndDirectoriesSegmentedAsync(int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext)

Returns a task that performs an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual Task<FileResultSegment> ListFilesAndDirectoriesSegmentedAsync(int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual Task<FileResultSegment> ListFilesAndDirectoriesSegmentedAsync(string prefix, int? maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to return a result segment containing a collection of file items in the share.

public virtual FileHandleResultSegment ListHandlesSegmented(FileContinuationToken token = null, int? maxResults = default, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Gets the SMB handles open on this directory.

public virtual Task<FileHandleResultSegment> ListHandlesSegmentedAsync(FileContinuationToken token = null, int? maxResults = default, bool? recursive = default, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Returns a task that performs an asynchronous operation to get the SMB handles open on this directory.

public virtual void SetMetadata(AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null)

Updates the directory's metadata.

public virtual Task SetMetadataAsync()

Returns a task that performs an asynchronous operation to update the directory's metadata.

public virtual Task SetMetadataAsync(CancellationToken cancellationToken)

Returns a task that performs an asynchronous operation to update the directory's metadata.

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

Returns a task that performs an asynchronous operation to update the directory's metadata.

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

Returns a task that performs an asynchronous operation to update the directory's metadata.

public virtual void SetProperties(FileRequestOptions options = null, OperationContext operationContext = null)

Updates the directory's properties.

public virtual Task SetPropertiesAsync(FileRequestOptions options = null, OperationContext operationContext = null, CancellationToken? cancellationToken = default)

Updates the directory's properties.