-
public final class MediaFileCreated on 06/09/20
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceMediaFile.AccessCallback
-
Field Summary
Fields Modifier and Type Field Description private MediaFile.AccessCallbackaccessCallbackprivate final StringfullNameprivate final Stringnameprivate final StringbaseNameprivate final Stringextensionprivate final Stringtypeprivate final StringmimeTypeprivate Longlengthprivate final StringformattedSizeprivate final BooleanisEmptyprivate final BooleanpresentsInSafDatabaseprivate final BooleanhasZeroLengthprivate final BooleanisRawFileprivate final LonglastModifiedprivate final Stringownerprivate final BooleanisMineprivate final StringabsolutePathprivate final StringbasePathprivate final StringrelativePathprivate BooleanisPendingprivate final Uriuri
-
Method Summary
-
-
Method Detail
-
getAccessCallback
final MediaFile.AccessCallback getAccessCallback()
Only useful for Android 10 and higher.
-
setAccessCallback
final Unit setAccessCallback(MediaFile.AccessCallback accessCallback)
Only useful for Android 10 and higher.
-
getFullName
final String getFullName()
-
getBaseName
final String getBaseName()
-
getExtension
final String getExtension()
-
getMimeType
final String getMimeType()
-
getFormattedSize
final String getFormattedSize()
-
getIsEmpty
final Boolean getIsEmpty()
-
getPresentsInSafDatabase
final Boolean getPresentsInSafDatabase()
-
getHasZeroLength
final Boolean getHasZeroLength()
-
getIsRawFile
final Boolean getIsRawFile()
-
getLastModified
final Long getLastModified()
-
getAbsolutePath
final String getAbsolutePath()
-
getBasePath
final String getBasePath()
-
getRelativePath
final String getRelativePath()
-
getIsPending
@RequiresApi(value = 29) final Boolean getIsPending()
-
setIsPending
@RequiresApi(value = 29) final Unit setIsPending(Boolean isPending)
-
toRawFile
@Deprecated(message = Accessing files with java.io.File only works on app private directory since Android 10.) final Void toRawFile()
-
toDocumentFile
final <ERROR CLASS> toDocumentFile()
-
renameTo
final Boolean renameTo(String newName)
Please note that this function does not move file if you input
newNameasDownload/filename.mp4. If you want to move media files, please use moveFileTo instead.
-
openFileIntent
@UiThread() final Intent openFileIntent(String authority)
-
openOutputStream
@WorkerThread()@JvmOverloads() final OutputStream openOutputStream(Boolean append)
- Parameters:
append- iffalseand the file already exists, it will recreate the file.
-
openOutputStream
@WorkerThread()@JvmOverloads() final OutputStream openOutputStream()
-
openInputStream
@WorkerThread() final InputStream openInputStream()
-
moveTo
@WorkerThread() final Unit moveTo(DocumentFile targetFolder, FileDescription fileDescription, FileCallback callback)
-
copyTo
@WorkerThread() final Unit copyTo(DocumentFile targetFolder, FileDescription fileDescription, FileCallback callback)
-
-
-
-