FileOperationResult
class FileOperationResult : Parcelable
| kotlin.Any | |
| ↳ | android.os.storage.operations.FileOperationResult |
Represents the result of a file operation.
Summary
| Constants | |
|---|---|
| static Int |
The system is too busy to handle the request. |
| static Int |
The operation failed because the disk is full. |
| static Int |
The system cannot fulfill the request as configured. |
| static Int |
Successful operation. |
| static Int |
The operation failed due to missing permissions. |
| static Int |
An unknown error. |
| static Int |
The source of the operation is unsupported or invalid. |
| static Int |
The target of the operation is unsupported or invalid. |
| static Int |
The operation failed. |
| static Int |
The operation finished successfully. |
| static Int |
The operation is currently running. |
| static Int |
The operation is queued and waiting to start. |
| static Int |
Unknown status. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Int |
Returns the error code if the operation failed. |
| String? |
Returns the error message if the operation failed. |
| MutableList<String!> |
Returns the list of failures. |
| String |
Returns the unique ID of the request. |
| OperationSource |
Returns the |
| Int |
Returns the current status of the operation. |
| OperationTarget? |
Returns the target of the file operation. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<FileOperationResult!> | |
Constants
ERROR_BUSY
static val ERROR_BUSY: Int
The system is too busy to handle the request.
This error is transient. Applications should consider retrying the operation after a short delay, potentially using an exponential backoff strategy.
Value: 1ERROR_DISK_FULL
static val ERROR_DISK_FULL: Int
The operation failed because the disk is full.
This error is potentially transient if the user clears enough space on the storage device.
Value: 6ERROR_INVALID_REQUEST
static val ERROR_INVALID_REQUEST: Int
The system cannot fulfill the request as configured.
This error is permanent as it indicates a malformed or invalid request.
Value: 2ERROR_PERMISSION_DENIED
static val ERROR_PERMISSION_DENIED: Int
The operation failed due to missing permissions.
This error is permanent unless the user manually grants the required permissions.
Value: 5ERROR_UNSUPPORTED_SOURCE
static val ERROR_UNSUPPORTED_SOURCE: Int
The source of the operation is unsupported or invalid.
This error is permanent as it indicates an issue with the request.
Value: 3ERROR_UNSUPPORTED_TARGET
static val ERROR_UNSUPPORTED_TARGET: Int
The target of the operation is unsupported or invalid.
This error is permanent as it indicates an issue with the request.
Value: 4STATUS_FINISHED
static val STATUS_FINISHED: Int
The operation finished successfully.
Value: 3STATUS_IN_PROGRESS
static val STATUS_IN_PROGRESS: Int
The operation is currently running.
Value: 2STATUS_QUEUED
static val STATUS_QUEUED: Int
The operation is queued and waiting to start.
Value: 1Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getErrorCode
fun getErrorCode(): Int
Returns the error code if the operation failed.
| Return | |
|---|---|
Int |
Value is one of the following: |
getErrorMessage
fun getErrorMessage(): String?
Returns the error message if the operation failed.
| Return | |
|---|---|
String? |
This value may be null. |
getFailedPaths
fun getFailedPaths(): MutableList<String!>
Returns the list of failures.
This list is only populated when the operation reaches a terminal state (STATUS_FINISHED or STATUS_FAILED).
Note: Due to binder transaction limits, this list can truncate the total number of reported failures. If failures occurred, only the first android.os.storage.FileManager#getMaxReportedFailures are reported.
| Return | |
|---|---|
MutableList<String!> |
This value cannot be null. |
getRequestId
fun getRequestId(): String
Returns the unique ID of the request.
| Return | |
|---|---|
String |
This value cannot be null. |
getSource
fun getSource(): OperationSource
Returns the OperationSource that was configured in the original FileOperationRequest.
For example, if an operation was created using a AppDataFileSource that object would be returned here.
| Return | |
|---|---|
OperationSource |
This value cannot be null. |
getStatus
fun getStatus(): Int
Returns the current status of the operation.
| Return | |
|---|---|
Int |
Value is one of the following: |
getTarget
fun getTarget(): OperationTarget?
Returns the target of the file operation.
| Return | |
|---|---|
OperationTarget? |
This value may be null. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|