KaliumFileSystem

Properties

Link copied to clipboard
abstract 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.

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

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

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

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

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

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

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.

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

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

Link copied to clipboard
abstract 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

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

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.

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