问题描述
任何想法如何在单个查询中查询所有孩子和孩子的孩子?
Any ideas how to query for all the children and the children of the children in a single query?
更新
这似乎是一个简单的问题.我怀疑是否有一个简单的解决方案?
It seems like a simple question. I doubt if there is a simple solution?
查询文件夹和文件树可能会花费大量 API 调用.因此,为了解决我的问题,我使用单个查询来列出所有者的所有文件和文件夹.此查询还返回子文件和子文件夹.要在列表中找到文件夹及其所有子文件夹(文件夹、文件、子文件夹和子文件),我必须创建一个类似索引的树.
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.
结论
单个查询是不够的.您必须列出所有或缩小与所有者的查询.接下来您必须索引结果以(递归)找到文件夹的树.
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.
像 (ls -R in Unix) 这样的查询选项会很好.
A query option like (ls -R in Unix) would be nice.
推荐答案
我认为您在更新"中的想法是正确的.将 Drive 视为平面,调用列出所有内容,并从中生成您自己的树.
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 Drive 文件夹的所有文件、文件夹、子文件夹和子文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)