KaliumFileSystemImpl

expect class KaliumFileSystemImpl(dataStoragePaths: DataStoragePaths, dispatcher: <Error class: unknown class> = KaliumDispatcherImpl) : KaliumFileSystem
actual class KaliumFileSystemImpl(dataStoragePaths: DataStoragePaths, dispatcher: <Error class: unknown class>) : KaliumFileSystem

Constructors

Link copied to clipboard
expect constructor(dataStoragePaths: DataStoragePaths, dispatcher: <Error class: unknown class> = KaliumDispatcherImpl)
actual constructor(dataStoragePaths: DataStoragePaths, dispatcher: <Error class: unknown class>)

Properties

Link copied to clipboard
abstract val rootCachePath: <Error class: unknown class>

Provides the root of the cache path, used to store temporary files

open override val rootCachePath: <Error class: unknown class>

Provides the root of the cache path, used to store temporary files

Link copied to clipboard
abstract val rootDBPath: <Error class: unknown class>

Provides the root of the current user database path, used to store all the Database information.

open override val rootDBPath: <Error class: unknown class>

Provides the root of the current user database path, used to store all the Database information.

Functions

Link copied to clipboard
abstract fun copy(sourcePath: <Error class: unknown class>, targetPath: <Error class: unknown class>)

Copies effectively the content of sourcePath into targetPath

open override fun copy(sourcePath: <Error class: unknown class>, targetPath: <Error class: unknown class>): <Error class: unknown class>

Copies effectively the content of sourcePath into targetPath

Link copied to clipboard
abstract fun createDirectories(dir: <Error class: unknown class>)

It will create the provided dir in the current file system along with the needed subdirectories if they were not created previously

open override fun createDirectories(dir: <Error class: unknown class>): <Error class: unknown class>

It will create the provided dir in the current file system along with the needed subdirectories if they were not created previously

Link copied to clipboard
abstract fun createDirectory(dir: <Error class: unknown class>, mustCreate: Boolean = false)

It will make sure the given dir gets created on the file system

open override fun createDirectory(dir: <Error class: unknown class>, mustCreate: Boolean): <Error class: unknown class>

It will make sure the given dir gets created on the file system

Link copied to clipboard
abstract fun delete(path: <Error class: unknown class>, mustExist: Boolean = false)

This will delete the content of the given file path

open override fun delete(path: <Error class: unknown class>, mustExist: Boolean): <Error class: unknown class>

This will delete the content of the given path

Link copied to clipboard
abstract fun deleteContents(dir: <Error class: unknown class>, mustExist: Boolean = false)

This will delete recursively the given dir and all its content

open override fun deleteContents(dir: <Error class: unknown class>, mustExist: Boolean): <Error class: unknown class>

This will delete recursively the given dir and all its content

Link copied to clipboard
abstract fun exists(path: <Error class: unknown class>): Boolean

Checks whether the given path is already created and exists on the current file system

open override fun exists(path: <Error class: unknown class>): Boolean

Checks whether the given path is already created and exists on the current file system

Link copied to clipboard
abstract suspend fun listDirectories(dir: <Error class: unknown class>): List<<Error class: unknown class>>

Provides a list of paths found in the given dir path from where the call is being invoked.

open suspend override fun listDirectories(dir: <Error class: unknown class>): List<<Error class: unknown class>>

Provides a list of paths found in the given dir path from where the call is being invoked.

Link copied to clipboard
abstract fun providePersistentAssetPath(assetName: String): <Error class: unknown class>

Creates a persistent path on the internal storage folder of the file system if it didn't exist before and returns it if successful

open override fun providePersistentAssetPath(assetName: String): <Error class: unknown class>

Creates a persistent path on the internal storage folder of the file system if it didn't exist before and returns it if successful

Link copied to clipboard
abstract suspend fun readByteArray(inputPath: <Error class: unknown class>): ByteArray

Reads the data of the given path as a byte array

open suspend override fun readByteArray(inputPath: <Error class: unknown class>): ByteArray

Reads the data of the given path as a byte array

Link copied to clipboard
abstract fun selfUserAvatarPath(): <Error class: unknown class>

Fetches the persistent Path of the current user's avatar in the KaliumFileSystem

open override fun selfUserAvatarPath(): <Error class: unknown class>

Fetches the persistent Path of the current user's avatar in the KaliumFileSystem

Link copied to clipboard
abstract fun sink(outputPath: <Error class: unknown class>, mustCreate: Boolean = false): <Error class: unknown class>

Opens an output stream that will be used to write the data on the given outputPath

open override fun sink(outputPath: <Error class: unknown class>, mustCreate: Boolean): <Error class: unknown class>

Opens an output stream that will be used to write the data on the given outputPath

Link copied to clipboard
abstract fun source(inputPath: <Error class: unknown class>): <Error class: unknown class>

Creates an input stream that will be used to read the data from the given inputPath

open override fun source(inputPath: <Error class: unknown class>): <Error class: unknown class>

Creates an input stream that will be used to read the data from the given inputPath

Link copied to clipboard
abstract fun tempFilePath(pathString: String? = null): <Error class: unknown class>

Creates a temporary path if it didn't exist before and returns it if successful.

open override fun tempFilePath(pathString: String?): <Error class: unknown class>

Creates a temporary path if it didn't exist before and returns it if successful

Link copied to clipboard
abstract suspend fun writeData(outputSink: <Error class: unknown class>, dataSource: <Error class: unknown class>): Long

Writes the data contained on dataSource into the provided outputSink

open suspend override fun writeData(outputSink: <Error class: unknown class>, dataSource: <Error class: unknown class>): Long

Writes the data contained on dataSource into the provided outputSink