MtpStorageInfo
class MtpStorageInfo
kotlin.Any | |
↳ | android.mtp.MtpStorageInfo |
This class encapsulates information about a storage unit on an MTP device. This corresponds to the StorageInfo Dataset described in section 5.2.2 of the MTP specification.
Summary
Public methods | |
---|---|
String |
Returns the description string for the storage unit. |
Long |
Returns the amount of free space in the storage unit in bytes |
Long |
Returns the maximum storage capacity for the storage unit in bytes |
Int |
Returns the storage ID for the storage unit. |
String |
Returns the volume identifier for the storage unit |
Public methods
getDescription
fun getDescription(): String
Returns the description string for the storage unit. This is typically displayed to the user in the user interface on the MTP host.
Return | |
---|---|
String |
the storage unit description This value cannot be null . |
getFreeSpace
fun getFreeSpace(): Long
Returns the amount of free space in the storage unit in bytes
Return | |
---|---|
Long |
the amount of free space |
getMaxCapacity
fun getMaxCapacity(): Long
Returns the maximum storage capacity for the storage unit in bytes
Return | |
---|---|
Long |
the maximum capacity |
getStorageId
fun getStorageId(): Int
Returns the storage ID for the storage unit. The storage ID uniquely identifies the storage unit on the MTP device.
Return | |
---|---|
Int |
the storage ID |
getVolumeIdentifier
fun getVolumeIdentifier(): String
Returns the volume identifier for the storage unit
Return | |
---|---|
String |
the storage volume identifier This value cannot be null . |