AI-generated Key Takeaways
- 
          DriveFolder represents a folder in Google Drive and allows listing, querying, and creating resources within it. 
- 
          A DriveFolder can be retrieved from a known Drive ID using the asDriveFolder()method.
- 
          The deprecated nested interfaces DriveFolder.DriveFileResultandDriveFolder.DriveFolderResultwere used to return DriveFile and DriveFolder objects respectively.
- 
          The constant MIME_TYPEprovides the MIME type associated with folder resources, which is "application/vnd.google-apps.folder".
- 
          Many public methods, such as createFile,createFolder,listChildren, andqueryChildren, are deprecated and newer methods fromDriveResourceClientshould be used instead.
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 asDriveFolder().
Nested Class Summary
| interface | DriveFolder.DriveFileResult | This interface was deprecated. DriveFileobjects are returned directly in the new Drive clients. | |
| interface | DriveFolder.DriveFolderResult | This interface was deprecated. DriveFolderobjects are returned directly in the new Drive clients. | |
Constant Summary
| String | MIME_TYPE | The MIME type associated with folder resources. | 
Public Method Summary
Inherited Method Summary
Constants
public static final String MIME_TYPE
The MIME type associated with folder resources.
Public Methods
public abstract PendingResult<DriveFolder.DriveFileResult> createFile (GoogleApiClient apiClient, MetadataChangeSet changeSet, DriveContents driveContents)
This method was deprecated.
          Use 
          createFile(DriveFolder, MetadataChangeSet, DriveContents) instead.
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.
Parameters
| apiClient | The GoogleApiClientto service the call. The client must be connected before invoking this method. | 
|---|---|
| changeSet | A set of metadata fields that should be initially set. | 
| driveContents | The initial contents. The provided contents must have been obtained through 
                newDriveContents(GoogleApiClient). ThisDriveContentscannot be reused after this method returns. This parameter may also be set tonullto 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). | 
Returns
- A PendingResult which can be used to retrieve the newly created DriveFile.
public abstract PendingResult<DriveFolder.DriveFileResult> createFile (GoogleApiClient apiClient, MetadataChangeSet changeSet, DriveContents driveContents, ExecutionOptions executionOptions)
This method was deprecated.
          Use 
          createFile(DriveFolder, MetadataChangeSet, DriveContents, ExecutionOptions)
          instead.
Creates a new binary file within this folder, with the provided initial metadata and
            DriveContents.
            See DriveFile
            for more details on binary files.
Parameters
| apiClient | The GoogleApiClientto service the call. The client must be connected before invoking this method. | 
|---|---|
| changeSet | A set of metadata fields that should be initially set. | 
| driveContents | The initial contents. The provided contents must have been obtained through 
                newDriveContents(GoogleApiClient). ThisDriveContentscannot be reused after this method returns. This parameter may also be set tonullto 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 ExecutionOptionsfor more details.
                setConflictStrategy(int)is not supported for this method. Whennullis provided, this method will use defaultExecutionOptions,
                that is no completion event requested and no operation tag. | 
Returns
- A PendingResult which can be used to retrieve the newly created DriveFile.
public abstract PendingResult<DriveFolder.DriveFolderResult> createFolder (GoogleApiClient apiClient, MetadataChangeSet changeSet)
This method was deprecated.
          Use 
          createFolder(DriveFolder, MetadataChangeSet) instead.
Creates a new folder within this folder, with the provided initial metadata.
Parameters
| apiClient | The GoogleApiClientto 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. | 
Returns
- A PendingResult which can be used to retrieve the newly created DriveFolder.
public abstract PendingResult<DriveApi.MetadataBufferResult> listChildren (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          listChildren(DriveFolder) instead.
Retrieves a collection of metadata for the direct children of this folder. The result will include metadata for both files and folders.
Parameters
| apiClient | The GoogleApiClientto service the call. | 
|---|
Returns
- A PendingResult which can be used to retrieve the children list. Be sure to call
              release()when you're done with the result.
public abstract PendingResult<DriveApi.MetadataBufferResult> queryChildren (GoogleApiClient apiClient, Query query)
This method was deprecated.
          Use 
          queryChildren(DriveFolder, Query) instead.
Retrieves a collection of metadata for the files and folders that match the specified query and are direct children of this folder.
Parameters
| apiClient | The GoogleApiClientto service the call. | 
|---|---|
| query | A query that will restrict the results of the retrieved children. | 
Returns
- A PendingResult which can be used to retrieve the children list. Be sure to call
              release()when you're done with the result.