drive  v3
Classes | Public Member Functions | List of all members
Google.Apis.Drive.v3.FilesResource Class Reference

The "files" collection of methods. More...

Classes

class  CopyRequest
 Creates a copy of a file and applies any requested updates with patch semantics. More...
 
class  CreateMediaUpload
 Create media upload which supports resumable upload. More...
 
class  CreateRequest
 Creates a new file. More...
 
class  DeleteRequest
 Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. More...
 
class  EmptyTrashRequest
 Permanently deletes all of the user's trashed files. More...
 
class  ExportRequest
 Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. More...
 
class  GenerateIdsRequest
 Generates a set of file IDs which can be provided in create or copy requests. More...
 
class  GetRequest
 Gets a file's metadata or content by ID. More...
 
class  ListRequest
 Lists or searches files. More...
 
class  UpdateMediaUpload
 Update media upload which supports resumable upload. More...
 
class  UpdateRequest
 Updates a file's metadata and/or content with patch semantics. More...
 
class  WatchRequest
 Subscribes to changes to a file More...
 

Public Member Functions

 FilesResource (Google.Apis.Services.IClientService service)
 Constructs a new resource. More...
 
virtual CopyRequest Copy (Google.Apis.Drive.v3.Data.File body, string fileId)
 Creates a copy of a file and applies any requested updates with patch semantics. More...
 
virtual CreateRequest Create (Google.Apis.Drive.v3.Data.File body)
 Creates a new file. More...
 
virtual CreateMediaUpload Create (Google.Apis.Drive.v3.Data.File body, System.IO.Stream stream, string contentType)
 Creates a new file. More...
 
virtual DeleteRequest Delete (string fileId)
 Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. More...
 
virtual EmptyTrashRequest EmptyTrash ()
 Permanently deletes all of the user's trashed files. More...
 
virtual ExportRequest Export (string fileId, string mimeType)
 Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. More...
 
virtual GenerateIdsRequest GenerateIds ()
 Generates a set of file IDs which can be provided in create or copy requests. More...
 
virtual GetRequest Get (string fileId)
 Gets a file's metadata or content by ID. More...
 
virtual ListRequest List ()
 Lists or searches files. More...
 
virtual UpdateRequest Update (Google.Apis.Drive.v3.Data.File body, string fileId)
 Updates a file's metadata and/or content with patch semantics. More...
 
virtual UpdateMediaUpload Update (Google.Apis.Drive.v3.Data.File body, string fileId, System.IO.Stream stream, string contentType)
 Updates a file's metadata and/or content with patch semantics. More...
 
virtual WatchRequest Watch (Google.Apis.Drive.v3.Data.Channel body, string fileId)
 Subscribes to changes to a file More...
 

Detailed Description

The "files" collection of methods.

Constructor & Destructor Documentation

◆ FilesResource()

Google.Apis.Drive.v3.FilesResource.FilesResource ( Google.Apis.Services.IClientService  service)
inline

Constructs a new resource.

Member Function Documentation

◆ Copy()

virtual CopyRequest Google.Apis.Drive.v3.FilesResource.Copy ( Google.Apis.Drive.v3.Data.File  body,
string  fileId 
)
inlinevirtual

Creates a copy of a file and applies any requested updates with patch semantics.

Parameters
bodyThe body of the request.
fileIdThe ID of the file.

◆ Create() [1/2]

virtual CreateRequest Google.Apis.Drive.v3.FilesResource.Create ( Google.Apis.Drive.v3.Data.File  body)
inlinevirtual

Creates a new file.

Parameters
bodyThe body of the request.

◆ Create() [2/2]

virtual CreateMediaUpload Google.Apis.Drive.v3.FilesResource.Create ( Google.Apis.Drive.v3.Data.File  body,
System.IO.Stream  stream,
string  contentType 
)
inlinevirtual

Creates a new file.

///

Parameters
bodyThe body of the request.
streamThe stream to upload.
contentTypeThe content type of the stream to upload.

◆ Delete()

virtual DeleteRequest Google.Apis.Drive.v3.FilesResource.Delete ( string  fileId)
inlinevirtual

Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.

Parameters
fileIdThe ID of the file.

◆ EmptyTrash()

virtual EmptyTrashRequest Google.Apis.Drive.v3.FilesResource.EmptyTrash ( )
inlinevirtual

Permanently deletes all of the user's trashed files.

◆ Export()

virtual ExportRequest Google.Apis.Drive.v3.FilesResource.Export ( string  fileId,
string  mimeType 
)
inlinevirtual

Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.

Parameters
fileIdThe ID of the file.
mimeTypeThe MIME type of the format requested for this export.

◆ GenerateIds()

virtual GenerateIdsRequest Google.Apis.Drive.v3.FilesResource.GenerateIds ( )
inlinevirtual

Generates a set of file IDs which can be provided in create or copy requests.

◆ Get()

virtual GetRequest Google.Apis.Drive.v3.FilesResource.Get ( string  fileId)
inlinevirtual

Gets a file's metadata or content by ID.

Parameters
fileIdThe ID of the file.

◆ List()

virtual ListRequest Google.Apis.Drive.v3.FilesResource.List ( )
inlinevirtual

Lists or searches files.

◆ Update() [1/2]

virtual UpdateRequest Google.Apis.Drive.v3.FilesResource.Update ( Google.Apis.Drive.v3.Data.File  body,
string  fileId 
)
inlinevirtual

Updates a file's metadata and/or content with patch semantics.

Parameters
bodyThe body of the request.
fileIdThe ID of the file.

◆ Update() [2/2]

virtual UpdateMediaUpload Google.Apis.Drive.v3.FilesResource.Update ( Google.Apis.Drive.v3.Data.File  body,
string  fileId,
System.IO.Stream  stream,
string  contentType 
)
inlinevirtual

Updates a file's metadata and/or content with patch semantics.

///

Parameters
bodyThe body of the request.
fileIdThe ID of the file.
streamThe stream to upload.
contentTypeThe content type of the stream to upload.

◆ Watch()

virtual WatchRequest Google.Apis.Drive.v3.FilesResource.Watch ( Google.Apis.Drive.v3.Data.Channel  body,
string  fileId 
)
inlinevirtual

Subscribes to changes to a file

Parameters
bodyThe body of the request.
fileIdThe ID of the file.

The documentation for this class was generated from the following file: