com.google.android.gms.drive.DriveFolder |
A folder in Drive. This class provides methods to list or query the contents of the folder, or create new resources within it.
To retrieve a DriveFolder from a known Drive ID, use
getFolder(GoogleApiClient, DriveId)
.
Nested Classes | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DriveFolder.DriveFileResult |
A result that contains a DriveFile .
|
||||||||||||||||||||||||||||
DriveFolder.DriveFolderResult |
A result that contains a DriveFolder .
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | MIME_TYPE | The MIME type associated with folder resources. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new binary file within this folder, with the provided initial metadata and
DriveContents .
| |||||||||||
Creates a new binary file within this folder, with the provided initial metadata and
DriveContents .
| |||||||||||
Creates a new folder within this folder, with the provided initial metadata.
| |||||||||||
Retrieves a collection of metadata for the direct children of this folder.
| |||||||||||
Retrieves a collection of metadata for the all authorized direct children of this folder.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
The MIME type associated with folder resources.
Creates a new binary file within this folder, with the provided initial metadata and
DriveContents
. See DriveFile
for more details on binary files.
apiClient | The GoogleApiClient to service the call. The client must be
connected before invoking this method. |
---|---|
changeSet | A set of metadata fields that should be initially set. This must minimally include a title and mime type. |
driveContents | The initial contents. The provided contents must have been obtained
through newDriveContents(GoogleApiClient) . This DriveContents cannot be reused
after this method returns. This parameter may also be set to null to create an
empty file, but it is recommended to create non-empty files where the mime-type does not
support having a zero byte file (for example, image or PDF files). |
executionOptions | A set of options for this method execution, such as whether to send
an event when the action has completed on the server. See ExecutionOptions for
more details. setConflictStrategy(int) is not supported for
this method. When null is provided, this method will use default
ExecutionOptions , that is no completion event requested and no operation tag. |
Creates a new binary file within this folder, with the provided initial metadata and
DriveContents
. See DriveFile
for more details on binary files.
This method behaves like createFile(GoogleApiClient, MetadataChangeSet, DriveContents, ExecutionOptions)
with null
ExecutionOptions
, which means
no completion event requested and no operation tag.
apiClient | The GoogleApiClient to service the call. The client must be
connected before invoking this method. |
---|---|
changeSet | A set of metadata fields that should be initially set. This must minimally include a title and mime type. |
driveContents | The initial contents. The provided contents must have been obtained
through newDriveContents(GoogleApiClient) . This DriveContents cannot be reused
after this method returns. This parameter may also be set to null to create an
empty file, but it is recommended to create non-empty files where the mime-type does not
support having a zero byte file (for example, image or PDF files). |
Creates a new folder within this folder, with the provided initial metadata.
apiClient | The GoogleApiClient to service the call. The client must be
connected before invoking this method. |
---|---|
changeSet | A set of metadata fields that should be initially set. This must minimally include a title. The mime type will be set to the folder mime type. |
Retrieves a collection of metadata for the direct children of this folder. The result will include metadata for both files and folders.
apiClient | The GoogleApiClient to service the call. |
---|
release()
when you're done with the result.
Retrieves a collection of metadata for the all authorized direct children of this folder. Unless restricted by the query, the result will include metadata for both files and folders.
apiClient | The GoogleApiClient to service the call. |
---|---|
query | A query that will restrict the results of the retrieved children. |
release()
when you're done with the result.