MediaFileProperty

sealed interface MediaFileProperty

Using to provide information about media file.

Inheritors

Functions

Link copied to clipboard
abstract fun getDefaultFileName(extension: String): String
Link copied to clipboard
abstract fun getExternalFilesDir(subDir: String? = null): File?

Get application-specific storage folder.

Link copied to clipboard
abstract fun getFileByUri(uri: Uri): File?

Get file by uri. getFileByUri will query the DATA field corresponding to uri, and return the file if there is a corresponding path, null otherwise.

Link copied to clipboard
@RequiresApi(value = 24)
abstract fun getFileUriAboveApi24(file: File, authority: String): Uri

Get the uri by file.

Link copied to clipboard
@RequiresApi(value = 30)
abstract fun getFileUriAboveApi30(file: File): Uri?
@RequiresApi(value = 30)
abstract fun getFileUriAboveApi30(saveOptions: MutableMap<String, String>.() -> Unit): Uri?
Link copied to clipboard
abstract fun getFileUriOnApi23(file: File): Uri

Get the uri by file.

Link copied to clipboard
abstract fun getSharedFilesDir(): File

Get shared storage folder.