SalimAzureBlobAPI/SalimAzureAPI/AzureBlobManager.cs
/// <summary>
/// Checks if a blob (virtual) directory exists.
/// </summary>
/// <param name="containerName">Name of the container.</param>
/// <param name="directoryName">Name of the directory.</param>
/// <returns>True if the directory exists; false otherwise.</returns>
Checks if a blob (virtual) directory exists.
Checks if a blob ( virtual ) directory exists .
public bool DoesBlobDirectoryExist(string containerName, string directoryName)
        {
            bool returnValue = false;
            ExecuteWithExceptionHandling(
                    () =>
                    {
                        CloudBlobContainer container = _blobClient.GetContainerReference(containerName);
                        returnValue = container.ListBlobs(directoryName, false).ToArray().Length > 0;
                    });
            return returnValue;
        }
public bool DoesBlobDirectoryExist ( string containerName , string directoryName ) { bool returnValue = false ; ExecuteWithExceptionHandling ( ( ) => { CloudBlobContainer container = _blobClient . GetContainerReference ( containerName ) ; returnValue = container . ListBlobs ( directoryName , false ) . ToArray ( ) . Length > 0 ; } ) ; return returnValue ; }
Checks if a blob (virtual) directory exists.
Checks if a blob ( virtual ) directory exists .
True if the directory exists; false otherwise.
True if the directory exists ; false otherwise .
containerName
string
Name of the container.
Name of the container .
directoryName
string
Name of the directory.
Name of the directory .