简体   繁体   English

在App Engine上使用PHP的Google Cloud Storage文件夹列表

[英]Google Cloud Storage folders list with PHP on App Engine

I have been trouble looking a solution to get listed of Google Cloud Storage Folders list with PHP on App Engine without using GCS PHP API. 我一直在寻找一种解决方案,以在不使用GCS PHP API的情况下在App Engine上使用PHP获取Google Cloud Storage文件夹列表的列表时遇到麻烦。

  • I know that there is PHP API for this... 我知道这里有PHP API ...

  • I know that it is only listing files when (readdir, opendir and other PHP dir methods) but skipped any folder... 我知道它只是在列出文件时(readdir,opendir和其他PHP dir方法)而跳过任何文件夹...

Can somebody guide me with a tips, my question is that how do I get listed anything on a particular folder? 有人可以给我一些提示吗,我的问题是如何在特定文件夹中列出所有内容?

There is no such thing as a 'folder' on GCS - it is a flat file system. GCS上没有“文件夹”之类的东西-它是平面文件系统。

Folders are simulated in the UI + APIs but treating files with a '/' in the name as part of a folder structure. 文件夹是在UI + API中模拟的,但会将名称中带有“ /”的文件视为文件夹结构的一部分。

That being said, the gcs stream wrapper provided with App Engine should support opendir(), readdir(), closedir() on a Cloud Storage bucket and make it look like it's listing a folder. 话虽这么说,App Engine随附的gcs流包装器应在Cloud Storage存储分区上支持opendir(),readdir(),closedir(),并使其看起来像在列出文件夹。 How is this not working for you? 这怎么不适合您?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM