Dropbox-如何列出目录中的文件 [英] Dropbox - How to list files inside directory
本文介绍了Dropbox-如何列出目录中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
关于如何通过PHP api在Dropbox中列出Directoy内所有文件的任何想法吗?
Any idea on how to list all the files inside a directoy in Dropbox via the PHP api?
部分功能: searchFileNames 用下面的代码完成了我所需要的:
Partially the function: searchFileNames does what I need with the following code:
$dbxClient = new dbx\Client("<access_token>", "PHP-Example/1.0");
$result = $dbxClient->searchFileNames($path_dir, "<some_common_text>");
但是此函数在第二个参数上不提供任何通配符,我可以在其中指定"*"以列出所有文件.
but this function doesn't offer any wildcard on the second parameter where I could specify: "*" in order to list all the files.
有什么想法吗?
推荐答案
解决方案是:
$dbxClient->getMetadataWithChildren($path_dir)
这篇关于Dropbox-如何列出目录中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文