UserStorage

interface UserStorage

User storage interface.

This is the common interface for user storage peripherals, which provides access to the drone physical storage state, file system information, as well as formatting and encryption operations.

See also

Types

Link copied to clipboard
enum FileSystemState
File system state of the user storage.
Link copied to clipboard
interface FormattingState
Progress state of the formatting process.
Link copied to clipboard
enum FormattingType
Type of formatting.
Link copied to clipboard
interface MediaInfo
Information about media.
Link copied to clipboard
enum PasswordUsage
Usage for decryption.
Link copied to clipboard
enum PhysicalState
Physical state of the user storage.
Link copied to clipboard
enum Type
Type of user storage.

Functions

Link copied to clipboard
abstract fun canFormat(): Boolean
Tells whether the media can be formatted.
Link copied to clipboard
abstract fun format(@NonNull type: UserStorage.FormattingType): Boolean
abstract fun format(@NonNull type: UserStorage.FormattingType, @NonNull name: String): Boolean
Requests a format of the media.
Link copied to clipboard
abstract fun formattingState(): UserStorage.FormattingState
Gets the progress state of the formatting process.
Link copied to clipboard
abstract fun formatWithEncryption(    @NonNull password: String,     @NonNull type: UserStorage.FormattingType,     @Nullable name: String): Boolean
Requests a format of the media with encryption.
Link copied to clipboard
abstract fun getAvailableSpace(): Long
Gets available free space on current media.
Link copied to clipboard
abstract fun getFileSystemState(): UserStorage.FileSystemState
Gets the current file system state of the user storage.
Link copied to clipboard
abstract fun getMediaInfo(): UserStorage.MediaInfo
Gets information on current media.
Link copied to clipboard
abstract fun getPhysicalState(): UserStorage.PhysicalState
Gets the current physical state of the user storage.
Link copied to clipboard
abstract fun getUuid(): String
Gets the UUID of user storage.
Link copied to clipboard
abstract fun hasCheckError(): Boolean
Tells whether media failed being checked without error.
Link copied to clipboard
abstract fun isEncrypted(): Boolean
Tells whether the media is encrypted.
Link copied to clipboard
abstract fun isEncryptionSupported(): Boolean
Tells whether the media can be encrypted.
Link copied to clipboard
abstract fun sendPassword(@NonNull password: String, @NonNull usage: UserStorage.PasswordUsage): Boolean
Sends a password in order to decrypt the media.
Link copied to clipboard
abstract fun supportedFormattingTypes(): EnumSet<UserStorage.FormattingType>
Retrieves the supported formatting types.

Inheritors

Link copied to clipboard
Link copied to clipboard