目录

Drive.Files

Class Info

public class Drive.Files extends java.lang.Object

Drive.Files类结构。

Nested Class Summary

Qualifier and Type

Class Name and Description

class

Drive.Files.Copy

Drive.Files.Copy类声明。

class

Drive.Files.Create

Drive.Files.Create类声明。

class

Drive.Files.Delete

Drive.Files.Delete类声明。

class

Drive.Files.EmptyRecycle

Drive.Files.EmptyRecycle类声明。

class

Drive.Files.Get

Drive.Files.Get类声明。

class

Drive.Files.List

Drive.Files.List类声明。

class

Drive.Files.Update

Drive.Files.Update类声明。

class

Drive.Files.Subscribe

Drive.Files.Subscribe类声明。

Public Constructor Summary

Constructor Name

Drive.Files()

Drive.Files构造方法。

Public Method Summary

Qualifier and Type

Method Name and Description

Drive.Files.Copy

copy(String fileId, File content)

拷贝文件,即创建一个文件的副本。

Drive.Files.Create

create(File content)

创建文件目录。

Drive.Files.Create

create(File content, AbstractInputStreamContent mediaContent)

创建文件。

Drive.Files.Delete

delete(String fileId)

永久删除文件(夹)。

Drive.Files.EmptyRecycle

emptyRecycle()

清空回收站。

Drive.Files.Get

get(String fileId)

获取文件元数据。

Drive.Files.List

list()

列出或搜索文件。

Drive.Files.Subscribe

subscribe(String fileId, Channel content)

订阅云端文件(包括文件夹)的变化,如果有变化,会向应用发送回调通知。

Drive.Files.Update

update(String fileId, File content)

更新文件元数据,当前由应用实现更新文件操作。

Drive.Files.Update

update(String fileId, File content, AbstractInputStreamContent mediaContent)

更新文件内容或者元数据,当前由应用实现更新文件操作。

Public Constructors

[h2]Drive.Files

Constructor

public Drive.Files()

构造一个Drive.Files类对象。

Public Methods

[h2]copy

Method

public Drive.Files.Copy copy(String fileId, File content) throws java.io.IOException

拷贝文件,即创建一个文件的副本。

Parameters

Name

Description

fileId

文件ID。

content

文件副本的元数据。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Copy

返回一个Drive.Files.Copy类对象。

[h2]create

Method

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

创建文件目录。

Parameters

Name

Description

content

File类对象。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Create

返回一个Drive.Files.Create对象。

[h2]create

Method

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

创建文件。

Parameters

Name

Description

content

File类对象。

mediaContent

媒体数据流。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Create

返回一个Drive.Files.Create对象。

[h2]delete

Method

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

永久删除文件(夹)。

Parameters

Name

Description

fileId

文件ID,通过Files.list接口获取到文件列表信息时会返回文件的fileId。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Delete

返回一个Drive.Files.Delete对象。

[h2]emptyRecycle

Method

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

清空回收站。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.EmptyRecycle

返回一个Drive.Files.EmptyRecycle对象。

[h2]get

Method

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

获取文件元数据。

Parameters

Name

Description

fileId

文件ID,通过Files.list接口获取到文件列表信息时会返回文件的fileId。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Get

返回一个Drive.Files.Get对象。

[h2]list

Method

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

获取文件列表。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.List

返回一个Drive.Files.List对象。

[h2]update

Method

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

更新文件元数据,当前由应用实现更新文件操作。

Parameters

Name

Description

fileId

文件ID,通过Files.list接口获取到文件列表信息时会返回文件的fileId。

content

File类对象。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Update

返回一个Drive.Files.Update对象。

[h2]update

Method

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

更新文件内容或者元数据,当前由应用实现更新文件操作。

Parameters

Name

Description

fileId

文件ID,通过Files.list接口获取到文件列表信息时会返回文件的fileId。

content

File类对象。

mediaContent

媒体类数据。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Update

返回一个Drive.Files.Update对象。

[h2]subscribe

Method

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

订阅云端文件(包括文件夹)的变化,如果有变化,会向应用发送回调通知。

Parameters

Name

Description

fileId

文件ID。

content

订阅的Channel(您可根据Channel对象的定义自行设置)。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。

Returns

Type

Description

Drive.Files.Subscribe

返回一个Drive.Files.Subscribe对象。