在谷歌驱动器.NET创建文件夹 [英] Create folder on google drive .net
本文介绍了在谷歌驱动器.NET创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用谷歌驱动器SDK。我很好的鉴别,并得到driveservice的实例。但我想添加的根简单的文件夹中,我发现这个
文件体=新的文件();
body.Title =文档标题;
body.Description =文件说明;
body.MimeType =应用/ vnd.google-apps.folder;
//服务是授权驱动器的API服务实例
文件file = service.Files.Insert(体).Fetch();
但Google.Apis.Drive.v2.FilesResource.InsertRequest没有取方法???
我如何使用File对象,将其插入的根文件夹?
感谢
解决方案
文件file = service.Files.Insert(体).Execute();
工作完美!
我刚刚在我班上实现IDataStore一个错误。
i'm trying to use Google drive sdk. I'm ok for authentification and get instance of driveservice. But i'm want to add a simple folder on root, i've found this
File body = new File();
body.Title = "document title";
body.Description = "document description";
body.MimeType = "application/vnd.google-apps.folder";
// service is an authorized Drive API service instance
File file = service.Files.Insert(body).Fetch();
But Google.Apis.Drive.v2.FilesResource.InsertRequest don't have Fetch method ???
how can i use File object to insert it on root folder ??
thanks
解决方案
File file = service.Files.Insert(body).Execute();
Work perfectly !!!
i've just had an error in my class that implement IDataStore.
这篇关于在谷歌驱动器.NET创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文