| Modifier and Type | Class and Description |
|---|---|
class |
Drive.Files.Copy |
class |
Drive.Files.Delete |
class |
Drive.Files.EmptyTrash |
class |
Drive.Files.Export |
class |
Drive.Files.GenerateIds |
class |
Drive.Files.Get |
class |
Drive.Files.Insert |
class |
Drive.Files.List |
class |
Drive.Files.Patch |
class |
Drive.Files.Touch |
class |
Drive.Files.Trash |
class |
Drive.Files.Untrash |
class |
Drive.Files.Update |
class |
Drive.Files.Watch |
| Constructor and Description |
|---|
Files() |
| Modifier and Type | Method and Description |
|---|---|
Drive.Files.Copy |
copy(String fileId,
File content)
Creates a copy of the specified file.
|
Drive.Files.Delete |
delete(String fileId)
Permanently deletes a file by ID.
|
Drive.Files.EmptyTrash |
emptyTrash()
Permanently deletes all of the user's trashed files.
|
Drive.Files.Export |
export(String fileId,
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 insert or copy requests.
|
Drive.Files.Get |
get(String fileId)
Gets a file's metadata by ID.
|
Drive.Files.Insert |
insert(File content)
Insert a new file.
|
Drive.Files.Insert |
insert(File content,
AbstractInputStreamContent mediaContent)
Insert a new file.
|
Drive.Files.List |
list()
Lists the user's files.
|
Drive.Files.Patch |
patch(String fileId,
File content)
Updates file metadata and/or content.
|
Drive.Files.Touch |
touch(String fileId)
Set the file's updated time to the current server time.
|
Drive.Files.Trash |
trash(String fileId)
Moves a file to the trash.
|
Drive.Files.Untrash |
untrash(String fileId)
Restores a file from the trash.
|
Drive.Files.Update |
update(String fileId,
File content)
Updates file metadata and/or content.
|
Drive.Files.Update |
update(String fileId,
File content,
AbstractInputStreamContent mediaContent)
Updates file metadata and/or content.
|
Drive.Files.Watch |
watch(String fileId,
Channel content)
Subscribe to changes on a file
Create a request for the method "files.watch".
|
public Drive.Files.Copy copy(String fileId, File content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to copy.content - the FileIOExceptionpublic Drive.Files.Delete delete(String fileId) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to delete.IOExceptionpublic Drive.Files.EmptyTrash emptyTrash() throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.IOExceptionpublic Drive.Files.Export export(String fileId, String mimeType) throws 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.IOExceptionpublic Drive.Files.GenerateIds generateIds() throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.IOExceptionpublic Drive.Files.Get get(String fileId) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID for the file in question.IOExceptionpublic Drive.Files.Insert insert(File content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.content - the FileIOExceptionpublic Drive.Files.Insert insert(File content, AbstractInputStreamContent mediaContent) throws 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.IOException - if the initialization of the request failspublic Drive.Files.List list() throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.IOExceptionpublic Drive.Files.Patch patch(String fileId, File content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to update.content - the FileIOExceptionpublic Drive.Files.Touch touch(String fileId) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to update.IOExceptionpublic Drive.Files.Trash trash(String fileId) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to trash.IOExceptionpublic Drive.Files.Untrash untrash(String fileId) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to untrash.IOExceptionpublic Drive.Files.Update update(String fileId, File content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID of the file to update.content - the FileIOExceptionpublic Drive.Files.Update update(String fileId, File content, AbstractInputStreamContent mediaContent) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.
This method should be used for uploading media content.
fileId - The ID of the file to update.content - the File media metadata or null if nonemediaContent - The media HTTP content or null if none.IOException - if the initialization of the request failspublic Drive.Files.Watch watch(String fileId, Channel content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.fileId - The ID for the file in question.content - the ChannelIOExceptionCopyright © 2011–2019 Google. All rights reserved.