I want to delete some blob directory using Azure Java SDK (
#3
Any ideas how can improve my function?
CodePudding user response:
Considering your Storage Account is ADLS Gen2, you cannot use Blob Storage SDK to delete folders as the folders in your General Purpose Storage accounts are virtual folders (they are simply blob prefixes).
In order to delete the folders, you would want to use SDK specific for ADLS Gen2 accounts. The SDK you would want to use is com.azure:azure-storage-file-datalake
.
You can find more details about using the SDK and some code samples here: https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-java.