google / renameio

Package renameio provides a way to atomically create or replace a file or symbolic link.
Apache License 2.0
609 stars 27 forks source link

Add WithSyncDirectory to optionally fsync the directory after the rename #42

Open Jille opened 10 months ago

Jille commented 10 months ago

WithSyncDirectory configures renameio to fsync the directory after renaming the file. If that succeeds it's guaranteed the file will be in the new state even after a crash.

Jille commented 10 months ago

Greetings from quis@ :)