LocalStorage

interface LocalStorage

Provides access to local storage on a device.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun copyFile(sourcePath: String, targetPath: String)

Copies a file from the source path to the target path.

Link copied to clipboard
abstract suspend fun deleteFile(filePath: String)

Deletes a file at the specified path.

Link copied to clipboard
abstract suspend fun fileExists(filePath: String): Boolean

Checks if a file exists at the specified path.

Link copied to clipboard
abstract suspend fun makeDir(path: String)

Creates a directory at the specified path.

Link copied to clipboard
abstract suspend fun readFile(filePath: String, mediaType: String? = null): Flow<ByteArray>

Reads a file from the specified path.

Link copied to clipboard
abstract suspend fun rmDir(path: String)

Removes a directory at the specified path.

Link copied to clipboard
abstract suspend fun saveFile(filePath: String, data: Flow<ByteArray>): Long

Saves a source of data bytes to a path.