FullRestoreDataInput


open class FullRestoreDataInput
kotlin.Any
   ↳ android.app.backup.FullRestoreDataInput

Provides the interface through which a BackupAgent reads entire files from a full backup data set, via its BackupAgent.onRestoreFile(FullRestoreDataInput) method.

Summary

Public methods
open Long

The version code of the app that created the backup.

open String

Content version set by the source device during a cross-platform transfer.

open ParcelFileDescriptor

Read-only file descriptor containing the file data.

open File

The file on disk to be restored with the given data.

open Long

The access mode to be assigned to the destination after its data is written.

open Long

A timestamp in the standard Unix epoch that represents the last modification time of the file when it was backed up, suitable to be assigned to the file after its data is written.

open Long

Size of the file in bytes.

open Int

Flags with additional information about the transport.

open Int

The kind of file system object being restored.

Public methods

getAppVersionCode

open fun getAppVersionCode(): Long

The version code of the app that created the backup.

getContentVersion

open fun getContentVersion(): String

Content version set by the source device during a cross-platform transfer. Empty string if the source device did not provide a content version.

Return
String This value cannot be null.

getData

open fun getData(): ParcelFileDescriptor

Read-only file descriptor containing the file data.

Return
ParcelFileDescriptor This value cannot be null.

getDestination

open fun getDestination(): File

The file on disk to be restored with the given data.

Return
File This value cannot be null.

getMode

open fun getMode(): Long

The access mode to be assigned to the destination after its data is written. This is in the standard format used by chmod().

getModificationTimeSeconds

open fun getModificationTimeSeconds(): Long

A timestamp in the standard Unix epoch that represents the last modification time of the file when it was backed up, suitable to be assigned to the file after its data is written.
Value is a non-negative timestamp measured as the number of seconds since 1970-01-01T00:00:00Z.

Return
Long Value is a non-negative timestamp measured as the number of seconds since 1970-01-01T00:00:00Z.

getSize

open fun getSize(): Long

Size of the file in bytes.

getTransportFlags

open fun getTransportFlags(): Int

Flags with additional information about the transport. The transport flags that can be set are defined in BackupAgent.

Return
Int Value is either 0 or a combination of android.app.backup.BackupAgent#FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED, android.app.backup.BackupAgent#FLAG_DEVICE_TO_DEVICE_TRANSFER, android.app.backup.BackupAgent.FLAG_FAKE_CLIENT_SIDE_ENCRYPTION_ENABLED, and android.app.backup.BackupAgent#FLAG_CROSS_PLATFORM_DATA_TRANSFER_IOS

getType

open fun getType(): Int

The kind of file system object being restored. This will be either android.app.backup.BackupAgent#TYPE_FILE or BackupAgent.TYPE_DIRECTORY.

Return
Int Value is android.app.backup.BackupAgent.TYPE_EOF, android.app.backup.BackupAgent#TYPE_FILE, android.app.backup.BackupAgent#TYPE_DIRECTORY, or android.app.backup.BackupAgent.TYPE_SYMLINK