class info
public class Drive.Files extends java.lang.Object
Drive.Files class.

Nested Class Summary

TypeNameDesc
classDrive.Files.CopyDeclaration of the Drive.Files.Copy class.
classDrive.Files.CreateDeclaration of the Drive.Files.Create class.
classDrive.Files.DeleteDeclaration of the Drive.Files.Delete class.
classDrive.Files.EmptyRecycleDeclaration of the Drive.Files.EmptyRecycle class.
classDrive.Files.GetDeclaration of the Drive.Files.Get class.
classDrive.Files.ListDeclaration of the Drive.Files.List class.
classDrive.Files.UpdateDeclaration of the Drive.Files.Update class.
classDrive.Files.SubscribeDeclaration of the Drive.Files.Subscribe class.

Public Constructor Summary

Constructor name

Files() 

Constructor for the Drive.Files class.

Public Method Summary

Return typeMethod name
Drive.Files.Copy

copy(String fileId, File content)

Creates a copy of a file.

Drive.Files.Create

create(File content)

Creates a folder.

Drive.Files.Create

create(File content, AbstractInputStreamContent mediaContent)

Creates a file.

Drive.Files.Delete

delete(String fileId)

Permanently deletes a file or folder.

Drive.Files.EmptyRecycle

emptyRecycle()

Clears the recycle bin.

Drive.Files.Get

get(String fileId)

Obtains file metadata.

Drive.Files.List

list()

Lists or searches for files.

Drive.Files.Update

update(String fileId, File content)

Updates file metadata. Currently, the file update operation is implemented on the app side.

Drive.Files.Update

update(String fileId, File content, AbstractInputStreamContent mediaContent)

Updates file content or metadata. Currently, the file update operation is implemented on the app side.

Drive.Files.Subscribe

subscribe(String fileId, Channel content)

Subscribes to changes of files and folders. If any change is detected, a callback notification is sent to the app.

Public Constructor

constructor
public Drive.Files()
Constructs a Drive.Files object.

Public Methods

Method
public Drive.Files.Copy copy(String fileId, File content) throws java.io.IOException
Creates a copy of a file.

Parameters

Parameter nameParameter desc
fileIdFile ID.
contentFile to be copied.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.CopyA Drive.Files.Copy object.
Method


public Drive.Files.Create create(File content) throws java.io.IOException

Creates a folder.

Parameters

Parameter nameParameter desc
contentFile object.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.CreateA Drive.Files.Create object.
Method


public Drive.Files.Create create(File content, AbstractInputStreamContent mediaContent) throws java.io.IOException

Creates a file.

Parameters

Parameter nameParameter desc
contentFile object.
mediaContentMedia data flow.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.CreateA Drive.Files.Create object.
Method


public Drive.Files.Delete delete(String fileId) throws java.io.IOException

Permanently deletes a file or folder.

Parameters

Parameter nameParameter desc
fileIdFile ID, which is returned when a file list is obtained through the Files.list API.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.DeleteA Drive.Files.Delete object.
Method


public Drive.Files.EmptyRecycle emptyRecycle() throws java.io.IOException

Clears the recycle bin.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.EmptyRecycleA Drive.Files.EmptyRecycle object.
Method


public Drive.Files.Get get(String fileId) throws java.io.IOException

Obtains file metadata.

Parameters

Parameter nameParameter desc
fileIdFile ID, which is returned when a file list is obtained through the Files.list API.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.GetA Drive.Files.Get object.
Method


public Drive.Files.List list() throws java.io.IOException

Obtains the list of files.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.ListA Drive.Files.List object.
Method


public Drive.Files.Update update(String fileId, File content) throws java.io.IOException

Updates file metadata. Currently, the file update operation is implemented on the app side.

Parameters

Parameter nameParameter desc
fileIdFile ID, which is returned when a file list is obtained through the Files.list API.
contentFile object.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.UpdateA Drive.Files.Update object.
Method


public Drive.Files.Update update(String fileId, File content, AbstractInputStreamContent mediaContent) throws java.io.IOException

Updates file content or metadata. Currently, the file update operation is implemented on the app side.

Parameters

Parameter nameParameter desc
fileIdFile ID, which is returned when a file list is obtained through the Files.list API.
content

File object.

mediaContentMedia data.

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.UpdateA Drive.Files.Update object.
Method


public Drive.Files.Subscribe subscribe(String fileId, Channel content) throws java.io.IOException

Subscribes to changes of files and folders. If any change is detected, a callback notification is sent to the app.

Parameters

Parameter nameParameter desc
fileIdFile ID.
contentChannel to be subscribed. (You can set this parameter based on the definition of the Channel object.)

Throws

Parameter nameParameter desc
java.io.IOExceptionI/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description.

Return

typedesc
Drive.Files.SubscribeA Drive.Files.Subscribe object.