如何列出Google驱动器文件夹的所有文件,文件夹,子文件夹和子文件

编程入门 行业动态 更新时间:2024-10-09 23:20:22
本文介绍了如何列出Google驱动器文件夹的所有文件,文件夹,子文件夹和子文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

任何想法如何在单个查询中查询所有孩子和孩子的孩子?

更新

这似乎是一个简单的问题。我怀疑是否有简单的解决方案?

查询文件夹和文件树可能会花费很多API调用。 所以,为了解决我的问题,我使用单个查询来列出所有者的所有文件和文件夹。此查询还会返回子文件和子文件夹。要找到列表中的文件夹及其所有子文件夹(文件夹,文件,子文件夹和子文件),我必须创建一个索引树。 $ b

结论

单个查询是不够的。您必须列出所有者或缩小与所有者的查询。下一步你必须将结果索引到(递归)找到文件夹的树。

像Unix(ls -R)这样的查询选项会很好。

p>

解决方案

我认为你在更新中有正确的想法。将驱动器视为平板,拨打电话列出所有内容,并从中生成自己的树。

Any ideas how to query for all the children and the children of the children in a single query?

Update

It seems like a simple question. I doubt if there is a simple solution?

Quering the tree of folders and files can cost a lot of API calls. So, to solve my problem, I use a single query to list all the files and folders of an owner. This query also returns subfiles and subfolders. To find the folder and all of its children (folder, files, subfolders and subfiles) in the list, I had to create a tree like index.

Conclusion

A single query is not enough. You have to list all or narrow the query with an owner. Next You have to index the results to (recursive) find the tree for the folder.

A query option like (ls -R in Unix) would be nice.

解决方案

I think you have the right idea in your "update". Treat Drive as flat, make calls to list everything, and generate your own tree from that.

更多推荐

如何列出Google驱动器文件夹的所有文件,文件夹,子文件夹和子文件

本文发布于:2023-05-28 00:45:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/308199.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:词库加载错误:Could not find file 'D:\淘小白 高铁采集器win10\Configuration\Dict_Sto

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!