Class Info |
|---|
public class Drive.Files extends java.lang.Object Drive.Files类结构。 |
Qualifier and Type | Class Name and Description |
|---|---|
class | Drive.Files.Copy类声明。 |
class | Drive.Files.Create类声明。 |
class | Drive.Files.Delete类声明。 |
class | Drive.Files.EmptyRecycle类声明。 |
class | Drive.Files.Get类声明。 |
class | Drive.Files.List类声明。 |
class | Drive.Files.Update类声明。 |
class | Drive.Files.Subscribe类声明。 |
Qualifier and Type | Method Name and Description |
|---|---|
copy(String fileId, File content) 拷贝文件,即创建一个文件的副本。 | |
| 创建文件目录。 | |
create(File content, AbstractInputStreamContent mediaContent) 创建文件。 | |
delete(String fileId) 永久删除文件(夹)。 | |
| 清空回收站。 | |
get(String fileId) 获取文件元数据。 | |
list() 列出或搜索文件。 | |
subscribe(String fileId, Channel content) 订阅云端文件(包括文件夹)的变化,如果有变化,会向应用发送回调通知。 | |
update(String fileId, File content) 更新文件元数据,当前由应用实现更新文件操作。 | |
update(String fileId, File content, AbstractInputStreamContent mediaContent) 更新文件内容或者元数据,当前由应用实现更新文件操作。 |
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类对象。 |
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对象。 |
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对象。 |
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对象。 |
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对象。 |
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对象。 |
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对象。 |
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对象。 |
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对象。 |
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对象。 |