writeFile

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.