I want to retrieve all files of a folder in Google Cloud Storage. I searched a lot but cannot found anything. I have tried this:
$bucket = $storageService->objects->get(DEFAULT_BUCKET,"myfolder/",array());
$getBucketMarkup = generateMarkup('Get Bucket', $bucket);
print_r($getBucketMarkup);
I have solved it by putting two parameters of List Objects in array one Is delimiter and the second one is prefix
$bucket = $storageService->objects->listObjects(DEFAULT_BUCKET,array(
"delimiter"=>"/",
"prefix"=>$folder_name
));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.