A file in Drive. This class provides access to the contents and metadata of the specified file.
To retrieve a DriveFile from a known drive id, use
|DriveFile.DownloadProgressListener||A listener that listens for progress events on an active contents download.|
|int||MODE_READ_ONLY||A mode that opens the contents only for reading.|
|int||MODE_READ_WRITE||A mode that opens the contents for reading and writing.|
|int||MODE_WRITE_ONLY||A mode that opens the contents only for writing.|
A mode that opens the contents only for reading.
A mode that opens the contents for reading and writing.
A mode that opens the contents only for writing.
DriveContents that are associated with this file for read and/or write.
The returned file is a temporary copy available only to this app. The contents are returned
when they are available on the device in their entirety. To listen for progress, provide a
Note: to open the file in edit mode, the user must have edit access. See
|mode||Describes the mode in which to open the file. Possible values are
|listener||An optional listener that will announce progress as the file is downloaded.
If you don't care about progress, provide
DriveContentswhen they are available. If
isSuccess()returns true, it is recommended to check
getStatusCode(), since two possible values are considered success:
SUCCESSwhich means that the returned
DriveContentsis up to date, or
SUCCESS_CACHEwhich means that the returned
DriveContentsis a cached version, since the most up to date version could not be downloaded to the device (for example, due to connectivity).