When writing files I sometimes like to write into ...
# io
t
When writing files I sometimes like to write into a temporary file first and then rename it to ensure that the file content is always valid. However, as I understand
atomicMove
in
<http://kotlinx.io|kotlinx.io>
does not support overwriting existing files. Any advices how to achieve this? The problem with
delete
+
atomicMove
is that there exists a moment where the original file is deleted but the move did not happen yet.
f
Hey! Actually,
atomicMove
should support overwriting existing files. Do you experience the issue on some particular platform?
t
I work on Mac OS and sometimes Raspberry PI, if I remember correctly it was on Mac. I don't have the time to check it again right now, but I'll do so next week and write the results.
thank you color 1