File

data class File(val id: String, val uri: Uri, val displayName: String, val mimeType: String, val size: Long, val path: String?, val isDirectory: Boolean, val thumbnailUri: Uri? = null, val owner: String? = null, val metadata: FileMetadata = FileMetadata())

Constructors

Link copied to clipboard
constructor(id: String, uri: Uri, displayName: String, mimeType: String, size: Long, path: String?, isDirectory: Boolean, thumbnailUri: Uri? = null, owner: String? = null, metadata: FileMetadata = FileMetadata())

Properties

Link copied to clipboard

The display name of this file.

Link copied to clipboard
val id: String

A unique and stable identifier for this file.

Link copied to clipboard

Whether this file is a directory. If set, a folder icon will be shown instead of a file icon.

Link copied to clipboard

Additional metadata for this file.

Link copied to clipboard

The MIME type that is shown to the user and that is used to determine the icon.

Link copied to clipboard
val owner: String? = null

Name of the owner of this file (i.e. when this file was shared with the user by another person).

Link copied to clipboard
val path: String?

A path to this file. This is shown to the user purely for informational purposes. It is not used to open the file.

Link copied to clipboard
val size: Long

The size of this file in bytes.

Link copied to clipboard
val thumbnailUri: Uri? = null

An URI to a thumbnail of this file. This is used to show a preview of the file. Supported schemes:

Link copied to clipboard
val uri: Uri

The URI to this file. To open this file, an intent with this URI as data and ACTION_VIEW as action is used.