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

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

Classes

class  CopyRequest
 Creates a copy of the specified file. More...
 
class  DeleteRequest
 Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files. 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 insert or copy requests. More...
 
class  GetRequest
 Gets a file's metadata by ID. More...
 
class  InsertMediaUpload
 Insert media upload which supports resumable upload. More...
 
class  InsertRequest
 Insert a new file. More...
 
class  ListRequest
 Lists the user's files. More...
 
class  PatchRequest
 Updates file metadata and/or content. This method supports patch semantics. More...
 
class  TouchRequest
 Set the file's updated time to the current server time. More...
 
class  TrashRequest
 Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. More...
 
class  UntrashRequest
 Restores a file from the trash. More...
 
class  UpdateMediaUpload
 Update media upload which supports resumable upload. More...
 
class  UpdateRequest
 Updates file metadata and/or content. More...
 
class  WatchRequest
 Subscribe to changes on a file More...
 

Public Member Functions

 FilesResource (Google.Apis.Services.IClientService service)
 Constructs a new resource. More...
 
virtual CopyRequest Copy (Google.Apis.Drive.v2.Data.File body, string fileId)
 Creates a copy of the specified file. More...
 
virtual DeleteRequest Delete (string fileId)
 Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files. 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 insert or copy requests. More...
 
virtual GetRequest Get (string fileId)
 Gets a file's metadata by ID. More...
 
virtual InsertRequest Insert (Google.Apis.Drive.v2.Data.File body)
 Insert a new file. More...
 
virtual InsertMediaUpload Insert (Google.Apis.Drive.v2.Data.File body, System.IO.Stream stream, string contentType)
 Insert a new file. More...
 
virtual ListRequest List ()
 Lists the user's files. More...
 
virtual PatchRequest Patch (Google.Apis.Drive.v2.Data.File body, string fileId)
 Updates file metadata and/or content. This method supports patch semantics. More...
 
virtual TouchRequest Touch (string fileId)
 Set the file's updated time to the current server time. More...
 
virtual TrashRequest Trash (string fileId)
 Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. More...
 
virtual UntrashRequest Untrash (string fileId)
 Restores a file from the trash. More...
 
virtual UpdateRequest Update (Google.Apis.Drive.v2.Data.File body, string fileId)
 Updates file metadata and/or content. More...
 
virtual UpdateMediaUpload Update (Google.Apis.Drive.v2.Data.File body, string fileId, System.IO.Stream stream, string contentType)
 Updates file metadata and/or content. More...
 
virtual WatchRequest Watch (Google.Apis.Drive.v2.Data.Channel body, string fileId)
 Subscribe to changes on a file More...
 

Detailed Description

The "files" collection of methods.

Constructor & Destructor Documentation

◆ FilesResource()

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

Constructs a new resource.

Member Function Documentation

◆ Copy()

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

Creates a copy of the specified file.

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

◆ Delete()

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

Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.

Parameters
fileIdThe ID of the file to delete.

◆ EmptyTrash()

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

Permanently deletes all of the user's trashed files.

◆ Export()

virtual ExportRequest Google.Apis.Drive.v2.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.v2.FilesResource.GenerateIds ( )
inlinevirtual

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

◆ Get()

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

Gets a file's metadata by ID.

Parameters
fileIdThe ID for the file in question.

◆ Insert() [1/2]

virtual InsertRequest Google.Apis.Drive.v2.FilesResource.Insert ( Google.Apis.Drive.v2.Data.File  body)
inlinevirtual

Insert a new file.

Parameters
bodyThe body of the request.

◆ Insert() [2/2]

virtual InsertMediaUpload Google.Apis.Drive.v2.FilesResource.Insert ( Google.Apis.Drive.v2.Data.File  body,
System.IO.Stream  stream,
string  contentType 
)
inlinevirtual

Insert a new file.

///

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

◆ List()

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

Lists the user's files.

◆ Patch()

virtual PatchRequest Google.Apis.Drive.v2.FilesResource.Patch ( Google.Apis.Drive.v2.Data.File  body,
string  fileId 
)
inlinevirtual

Updates file metadata and/or content. This method supports patch semantics.

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

◆ Touch()

virtual TouchRequest Google.Apis.Drive.v2.FilesResource.Touch ( string  fileId)
inlinevirtual

Set the file's updated time to the current server time.

Parameters
fileIdThe ID of the file to update.

◆ Trash()

virtual TrashRequest Google.Apis.Drive.v2.FilesResource.Trash ( string  fileId)
inlinevirtual

Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.

Parameters
fileIdThe ID of the file to trash.

◆ Untrash()

virtual UntrashRequest Google.Apis.Drive.v2.FilesResource.Untrash ( string  fileId)
inlinevirtual

Restores a file from the trash.

Parameters
fileIdThe ID of the file to untrash.

◆ Update() [1/2]

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

Updates file metadata and/or content.

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

◆ Update() [2/2]

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

Updates file metadata and/or content.

///

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

◆ Watch()

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

Subscribe to changes on a file

Parameters
bodyThe body of the request.
fileIdThe ID for the file in question.

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