tryWrite

inline fun AtomicFile.tryWrite(block: (out: FileOutputStream) -> Unit)(source)

Perform the write operations inside block on this file. If block throws an exception the write will be failed. Otherwise the write will be applied atomically to the file.