Azure / azure-sdk-for-php

Microsoft Azure SDK for PHP
http://azure.microsoft.com/en-us/develop/php/
Apache License 2.0
415 stars 273 forks source link

setPrefix returning the same prefix as blob #974

Open neoacevedo opened 6 years ago

neoacevedo commented 6 years ago

I think the title is not enough to explain it, so I will do with an example. I have this code:

$blobListOptions = new ListBlobsOptions();
#$blobListOptions->setDelimiter("/");
$blobListOptions->setPrefix("directory1/subdirectory");
$blob_list = $blobRestProxy->listBlobs(CONTAINER, $blobListOptions);

What I expected for is the blobs (directories and files) inside directory1/subdirectory but I am getting as result the same prefix as blob.

Doesn't matter if I set a delimiter or not, if I set a slash in the path of setPrefix, the results is the same. The idea is to dig inside the prefix, not list it as a blob.

I saw this link but the answer is similar to my code so I don't understand the issue.