获取Google Cloud Storage中的文件列表(Appengine PHP) [英] Get list of Files in Google Cloud Storage (Appengine PHP)

查看:62
本文介绍了获取Google Cloud Storage中的文件列表(Appengine PHP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Google Cloud Storage存储桶"MyBucket",它有20个项目.我想在我的appengine PHP应用程序中获得这些文件名.

I have a Google Cloud Storage bucket "MyBucket" and it have 20 items. I would like to get those file name in my appengine PHP application.

我正在寻找是否可以使用App Engine的内置Google Cloud Storage(GCS)流包装器获取列表.

I'm Looking whether we can get the list using App Engine's built-in Google Cloud Storage (GCS) stream wrapper.

类似这样的东西:

require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
use google\appengine\api\cloud_storage\CloudStorageTools;

$bucket_name = 'gs://my-bucket/';
$file_list = CloudStorageTools::list($bucket_name); //Won't Work. Function like this

推荐答案

基于链接

based on ref. documentation for CloudStorateTools there is no such thing like listing files. Consider to use different API for accessing Google Cloud Storage like JSON API. For list function you can check this link.

这篇关于获取Google Cloud Storage中的文件列表(Appengine PHP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆