IOLocalStorageAdapter

open class IOLocalStorageAdapter(fileSystem: FileSystem = SystemFileSystem) : LocalStorage

Storage adapter for local storage using the KotlinX IO library

Constructors

Link copied to clipboard
constructor(fileSystem: FileSystem = SystemFileSystem)

Functions

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

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

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

Deletes a file at the specified path.

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

Checks if a file exists at the specified path.

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

Creates a directory at the specified path.

Link copied to clipboard
open suspend override fun readFile(filePath: String, mediaType: String?): Flow<ByteArray>

Reads a file from the specified path.

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

Removes a directory at the specified path.

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

Saves a source of data bytes to a path.