如何找到文件夹是否存在 [英] How to found if folder exist or not

查看:96
本文介绍了如何找到文件夹是否存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我是如何找到文件夹exixt或不在谷歌驱动器与vb.net。我搜索了许多教程和页面,我不能这样做



我尝试过:



i我想我会做一个文件夹列表,如果我的文件夹存在于列表中,则messagebox将显示存在的消息,否则我的文件夹将在驱动器中上传。问题是我是怎么做的,我非常困难

I want to know how i found if folder exixt or not in google drive with vb.net . i searched many tutorial and page and i can't do it

What I have tried:

i think i will do a list of folder ,and if my folder exist in list , messagebox will show exist message else my folder will be upload in drive . the problem is how i do it , i'm very very stuck

推荐答案

Google Drive List命令有一个查询参数:文件:列表  | 推动REST API v2  |  Google Developers [ ^ ]



有关如何查询的更多信息:搜索文件  | 推动REST API v2  |  Google Developers [ ^ ]



注意:文件和文件夹使用相同的API端点,mimetype确定它是文件夹还是文件。有关详情,请访问:使用文件夹  | 推动REST API v2  |  Google Developers [ ^ ]



更新:根据搜索文件  | 推动REST API v2  |  Google Developers [ ^ ] ,搜索文件夹:
The Google Drive List command has a query parameter: Files: list  |  Drive REST API v2  |  Google Developers[^]

More information here on how to query: Search for Files  |  Drive REST API v2  |  Google Developers[^]

Note: Files and folders use the same API endpoints, the mimetype determines if it is a folder or a file. More information here: Work with Folders  |  Drive REST API v2  |  Google Developers[^]

UPDATE: As per the Search for Files  |  Drive REST API v2  |  Google Developers[^], searching for a folder:
"mimeType = 'application/vnd.google-apps.folder' AND name = '[foldername]'"



请花点时间阅读文档和Google提供的优秀示例。


Please take the time to read the documentation and the excellent examples given by Google.


这篇关于如何找到文件夹是否存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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