FileUtils

actual object FileUtils
actual object FileUtils
expect object FileUtils

Functions

Link copied to clipboard
actual fun clearDirectory(source: String)
actual fun clearDirectory(source: String)
expect fun clearDirectory(source: String)
Link copied to clipboard
actual fun deleteFile(fileName: String, source: String): Boolean
actual fun deleteFile(fileName: String, source: String): Boolean
expect fun deleteFile(fileName: String, source: String): Boolean
Link copied to clipboard
actual fun init(context: Any?)
actual fun init(context: Any?)
expect fun init(context: Any?)
Link copied to clipboard
actual fun listFiles(source: String): List<String>

Lists regular JSON payload files under source, excluding temporary writes; returns empty when unavailable.

actual fun listFiles(source: String): List<String>
expect fun listFiles(source: String): List<String>
Link copied to clipboard
actual fun readFile(fileName: String, source: String): String?
actual fun readFile(fileName: String, source: String): String?
expect fun readFile(fileName: String, source: String): String?
Link copied to clipboard
actual fun writeFile(fileName: String, data: String, source: String): StorageError?

Writes a replacement file without truncating the previous payload; logs and returns a storage error on failure.

actual fun writeFile(fileName: String, data: String, source: String): StorageError?

Atomically writes a payload, logging failures before returning the shared storage error.

expect fun writeFile(fileName: String, data: String, source: String): StorageError?

Replaces a payload file and classifies write failures where the OS error is available. Returns null on success or StorageError on failure. Only writes use this contract because a failed save can silently stop proxy message delivery.