libotutil: Add API to create directory hierarchy recursively *and* fsync

To be really sure that any directory entries have hit disk we need to
call fsync() on the directory fd.  This API allows us to conveniently
create a directory hierarchy, fsyncing all of it along the way.
This commit is contained in:
Colin Walters committed 2014-04-11 18:43:13 -04:00
1 parent d27c78eab5
commit b19aea441a
2 files changed
+109

No files matched your search

+8
View File
@@ -83,5 +83,13 @@ gboolean ot_gfile_atomic_symlink_swap (GFile *path,
GCancellable *cancellable,
GError **error);
gboolean ot_util_ensure_directory_and_fsync (GFile *dir,
GCancellable *cancellable,
GError **error);
gboolean ot_util_fsync_directory (GFile *dir,
GCancellable *cancellable,
GError **error);
G_END_DECLS