util: Add an API to atomic-replace a file, dirfd relative, optional fsync

This can be used in other places too, but I plan to use it to write
the summary file.
This commit is contained in:
Colin Walters committed 2015-02-05 16:59:52 -05:00
1 parent 3b8ed12ab2
commit 65afe1110d
2 files changed
+52 -19

No files matched your search

+7
View File
@@ -69,6 +69,13 @@ gboolean ot_gfile_load_contents_utf8_allow_noent (GFile *path,
GCancellable *cancellable,
GError **error);
gboolean ot_file_replace_contents_at (int dfd,
const char *path,
GBytes *contents,
gboolean datasync,
GCancellable *cancellable,
GError **error);
gboolean ot_gfile_replace_contents_fsync (GFile *path,
GBytes *contents,
GCancellable *cancellable,