Closed fverneau closed 11 months ago
It should be possible.
I'm not sure how to do that, I'll have to check the Azure API to check if it is possible or not.
Anyway, it is possible to create folder from Azure website if you don't need to dynamically add/delete directories.
After google search, you just have to provide the file path to add/get/delete them. There is no notion of "directories" in blob containers API.
Example on how to do it:
QNetworkReply downloadFileReply = azure->downloadFile("CONTAINER_NAME_HERE", "subdir0/subdir1/test.txt"); QNetworkReply deleteFileReply = azure->deleteFile("CONTAINER_NAME_HERE", "subdir0/subdir1/test.txt"); // You need to delete all files from subdirectories to delete the subdirectory
Can you please confirm it works ? (If it works, I'll add this in the readme & example)
Thank you very much ! It works very fine. For information, when we get the list of files, subdirectories are in the filename. Example : "AccessTier : Hot" "AccessTierInferred : true" "BlobType : BlockBlob" "Cache-Control : " "Content-CRC64 : " "Content-Disposition : " "Content-Encoding : " "Content-Language : " "Content-Length : 18" "Content-MD5 : 9s7i09PJy9SQk4XtP0Y6Lw==" "Content-Type : application/octet-stream" "Creation-Time : Wed, 08 Nov 2023 12:42:42 GMT" "Etag : 0x8DBE058335F8012" "Last-Modified : Wed, 08 Nov 2023 12:42:42 GMT" "LeaseState : available" "LeaseStatus : unlocked" "Name : dir01/test_fv.txt" "OrMetadata : " "ServerEncrypted : true"
I added example in readme, thanks
Would it be possible to have a function that allows you to create or delete a directory in a Blob Container?