查询根目录中的文件和文件夹列表 [英] Query for list of files and folders in root directory

查看:253
本文介绍了查询根目录中的文件和文件夹列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得根目录中的文件和文件夹列表,而不必对所有文件进行排序。有没有一个查询会做到这一点?

I would like to get a list of files and folders in the root directory without having to sort through all the files. Is there a query that would do this?

推荐答案

根文件夹也可以用一个名为root的特殊别名来寻址,因此您可以通过以下查询获取根目录中的所有文件和文件夹:

The root folder can also be addressed with a special alias named "root", so you can get all files and folders in the root with the following query:

https://www.googleapis.com/drive/v2/files?q='root' in parents

如果不使用URL其中一个客户端库(他们自动处理它)。

Remember to escape the URL if not using one of the client libraries (they automatically take care of it).

有关搜索查询语言的更多详细信息,请查看https://developers.google.com/drive/search-parameters

For more details about the search query language, check https://developers.google.com/drive/search-parameters

这篇关于查询根目录中的文件和文件夹列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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