gfileutils: Add g_file_set_contents_full() and GFileSetContentsFlags

This is a new version of the g_file_set_contents() API which will allow
its safety to be controlled by some flags, allowing the user to choose
their preferred tradeoff between safety (`fsync()` calls) and speed.

Currently, the flags do nothing and the new API behaves like the old
API. This will change in the following commits.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1302
This commit is contained in:
Philip Withnall
2020-05-27 13:54:47 +01:00
parent 5b49df3b9f
commit 554107c23c
3 changed files with 77 additions and 5 deletions

View File

@@ -1613,7 +1613,9 @@ G_FILE_ERROR
GFileTest
g_file_error_from_errno
g_file_get_contents
GFileSetContentsFlags
g_file_set_contents
g_file_set_contents_full
g_file_test
g_mkstemp
g_mkstemp_full