public class Drive.Files
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Drive.Files.Copy |
class |
Drive.Files.Create |
class |
Drive.Files.Delete |
class |
Drive.Files.EmptyTrash |
class |
Drive.Files.Export |
class |
Drive.Files.GenerateIds |
class |
Drive.Files.Get |
class |
Drive.Files.List |
class |
Drive.Files.Update |
class |
Drive.Files.Watch |
Constructor and Description |
---|
Files() |
Modifier and Type | Method and Description |
---|---|
Drive.Files.Copy |
copy(java.lang.String fileId,
File content)
Creates a copy of a file and applies any requested updates with patch semantics.
|
Drive.Files.Create |
create(File content)
Creates a new file.
|
Drive.Files.Create |
create(File content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Creates a new file.
|
Drive.Files.Delete |
delete(java.lang.String fileId)
Permanently deletes a file owned by the user without moving it to the trash.
|
Drive.Files.EmptyTrash |
emptyTrash()
Permanently deletes all of the user's trashed files.
|
Drive.Files.Export |
export(java.lang.String fileId,
java.lang.String mimeType)
Exports a Google Doc to the requested MIME type and returns the exported content.
|
Drive.Files.GenerateIds |
generateIds()
Generates a set of file IDs which can be provided in create requests.
|
Drive.Files.Get |
get(java.lang.String fileId)
Gets a file's metadata or content by ID.
|
Drive.Files.List |
list()
Lists or searches files.
|
Drive.Files.Update |
update(java.lang.String fileId,
File content)
Updates a file's metadata and/or content with patch semantics.
|
Drive.Files.Update |
update(java.lang.String fileId,
File content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Updates a file's metadata and/or content with patch semantics.
|
Drive.Files.Watch |
watch(java.lang.String fileId,
Channel content)
Subscribes to changes to a file
Create a request for the method "files.watch".
|
public Drive.Files.Copy copy(java.lang.String fileId, File content) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.fileId
- The ID of the file.content
- the File
java.io.IOException
public Drive.Files.Create create(File content) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.content
- the File
java.io.IOException
public Drive.Files.Create create(File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
content
- the File
media metadata or null
if nonemediaContent
- The media HTTP content or null
if none.java.io.IOException
- if the initialization of the request failspublic Drive.Files.Delete delete(java.lang.String fileId) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.fileId
- The ID of the file.java.io.IOException
public Drive.Files.EmptyTrash emptyTrash() throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.java.io.IOException
public Drive.Files.Export export(java.lang.String fileId, java.lang.String mimeType) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.fileId
- The ID of the file.mimeType
- The MIME type of the format requested for this export.java.io.IOException
public Drive.Files.GenerateIds generateIds() throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.java.io.IOException
public Drive.Files.Get get(java.lang.String fileId) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.fileId
- The ID of the file.java.io.IOException
public Drive.Files.List list() throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.java.io.IOException
public Drive.Files.Update update(java.lang.String fileId, File content) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.fileId
- The ID of the file.content
- the File
java.io.IOException
public Drive.Files.Update update(java.lang.String fileId, File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
fileId
- The ID of the file.content
- the File
media metadata or null
if nonemediaContent
- The media HTTP content or null
if none.java.io.IOException
- if the initialization of the request failspublic Drive.Files.Watch watch(java.lang.String fileId, Channel content) throws java.io.IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.fileId
- The ID of the file.content
- the Channel
java.io.IOException