2014-01-24 109 views
1

我正在尝试使用Google Drive SDK。我没有认证和获得DriveService的实例。但我想补充的根简单的文件夹,我发现这一点:在Google Drive .NET上创建文件夹

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(); 

但Google.Apis.Drive.v2.FilesResource.InsertRequest没有获取方法?

如何使用File对象将其插入根文件夹?

+0

的可能的复制[如何使用.NET API在谷歌云端硬盘中创建文件夹吗?](http://stackoverflow.com/questions/10715962/how-to-create-folder-in-google-drive-using-net -API) –

回答

3
File file = service.Files.Insert(body).Execute(); 

工作完美!!!

我刚刚在我的班级发生了一个实现IDataStore的错误。

相关问题