FileStorage

interface FileStorage

* FileStorage - general interface for filesystem usage, it should provide any filesystem related operations in app on Java level.

Inheritors

Types

Link copied to clipboard
annotation class ContentType
Link copied to clipboard
annotation class StorageType

Properties

Link copied to clipboard
val APP_EXTERNAL: Int = 1
Link copied to clipboard
val BACKUP: Int = 5
Link copied to clipboard
val DOWNLOADS: Int = 4
Link copied to clipboard
val EXTERNAL: Int = 0
Types of storage
Link copied to clipboard
val INTERNAL: Int = 2
Link copied to clipboard
val LOGGING: Int = 7
Link copied to clipboard
val MEDIA: Int = 0
Groups of file contents according the app use cases (could be extended in case of new logical types file system usages created)
Link copied to clipboard
Link copied to clipboard
val QD_ICON: Int = 6
Link copied to clipboard
val RECORDINGS: Int = 1
Link copied to clipboard
val RINGTONES: Int = 2

Functions

Link copied to clipboard
abstract fun createCacheFile(@NonNull segments: Array<String>): File
Link copied to clipboard
abstract fun createPrivateFile(fileName: String, contentType: Int): File
Link copied to clipboard
abstract fun createUri(@Nullable file: File): Uri
Link copied to clipboard
abstract fun delete(@Nullable file: File): Boolean
abstract fun delete(fileName: String, contentType: Int, storageType: Int): Boolean
Link copied to clipboard
abstract fun deleteOnMediaStore(@NonNull uri: Uri): Boolean
Link copied to clipboard
abstract fun getCacheFile(@NonNull segments: Array<String>): File
Link copied to clipboard
abstract fun getExpandableRecordingPath(external: Boolean): String
Link copied to clipboard
abstract fun getFile(@NonNull fileName: String, contentType: Int, storageType: Int): File
Link copied to clipboard
abstract fun getFileSize(@NonNull uri: Uri): Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getStorageDirectory(contentType: Int, mediaType: MediaType, storageType: Int): String
Link copied to clipboard
abstract fun getUri(@Nullable file: File): Uri
Link copied to clipboard
abstract fun getVirtualFileSize(@NonNull uri: Uri): Long
Link copied to clipboard
abstract fun isEmpty(@Nullable file: File): Boolean
Link copied to clipboard
abstract fun isUriAccessible(@NonNull uri: Uri): Boolean
Link copied to clipboard
abstract fun moveToCache(@NonNull sourceFile: File, @NonNull segments: Array<String>): Uri
Link copied to clipboard
abstract fun releasePersistableUriPermissions(uris: List<Uri>, modeFlags: Int)
Link copied to clipboard
abstract fun save(@Nullable sourceUri: Uri, @Nullable targetStream: FileOutputStream): Boolean
abstract fun save(@NonNull bitmap: Bitmap, @NonNull fileName: String, storageType: Int): Uri
abstract fun save(@NonNull file: File, contentType: Int, storageType: Int): Uri
abstract fun save(@NonNull sourceUri: Uri, @NonNull fileName: String, contentType: Int, storageType: Int): Uri
abstract fun save(bytes: Array<Byte>, @NonNull fileName: String, contentType: Int, storageType: Int): Uri
abstract fun save(@NonNull sourceStream: InputStream, @NonNull fileName: String, contentType: Int, storageType: Int): Uri
Link copied to clipboard
abstract fun saveToCache(@NonNull bitmap: Bitmap, @NonNull segments: Array<String>): Uri
abstract fun saveToCache(@NonNull sourceUri: Uri, @NonNull segments: Array<String>): Uri
abstract fun saveToCache(bytes: Array<Byte>, @NonNull segments: Array<String>): Uri
abstract fun saveToCache(@NonNull sourceFile: File, @NonNull segments: Array<String>): Uri
abstract fun saveToCache(@NonNull sourceStream: InputStream, @NonNull segments: Array<String>): Uri
Link copied to clipboard
abstract fun saveToPrivateStorage(sourceUri: Uri, fileName: String, contentType: Int): Uri
Link copied to clipboard
abstract fun saveVirtualFile(@Nullable sourceUri: Uri, @Nullable targetStream: FileOutputStream): Boolean
Link copied to clipboard
abstract fun takePersistableUriPermission(uris: List<Uri>, modeFlags: Int)