0
我想列出包含在位於BLOB容器的根目錄下的「accidentsPhoto「文件夾」的所有斑點:PHP在Azure:如何列出BLOB的「文件夾」
// List blobs.
$key = 'accidentsPhoto';
$blobListOptions = new ListBlobsOptions();
$blobListOptions->setPrefix($key);
$blobListOptions->setDelimiter("/");
$blobList = $blobRestProxy->listBlobs($blobContainer, $blobListOptions);
foreach($blobList->getBlobPrefixes() as $key => $blob) {
echo "BlobPrefix ".$key.": \t".$blob->getName()."\n";
}
foreach($blobList->getBlobs() as $key => $blob) {
echo "Blob ".$key.": \t".$blob->getName()."\t(".$blob->getUrl().")\n";
}
唉,只有關鍵是如下:
Set-Cookie: XXXX
Date: Tue, 15 Aug 2017 12:42:28 GMT
Connection: keep-alive
BlobPrefix 0: accidentsPhoto/