summaryrefslogtreecommitdiff
path: root/vapi/glib-2.0.vapi
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-08-01 16:21:11 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2020-08-01 16:22:01 +0200
commit3d529adef9848a7cc5098491fce4bc28bc608bd1 (patch)
treeecde49f2d26f9665060b6c10b95dd6d97ccef232 /vapi/glib-2.0.vapi
parent6fb027ce0ecaccef42a5972e5f4664cadb226e75 (diff)
downloadvala-3d529adef9848a7cc5098491fce4bc28bc608bd1.tar.gz
glib-2.0: Add GLib.File.set_contents_full() binding (since 2.66)
Diffstat (limited to 'vapi/glib-2.0.vapi')
-rw-r--r--vapi/glib-2.0.vapi12
1 files changed, 12 insertions, 0 deletions
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 38d1872d9..d158122a0 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3863,6 +3863,8 @@ namespace GLib {
public static bool get_contents (string filename, out string contents, out size_t length = null) throws FileError;
[Version (since = "2.8")]
public static bool set_contents (string filename, string contents, ssize_t length = -1) throws FileError;
+ [Version (since = "2.66")]
+ public static bool set_contents_full (string filename, string contents, ssize_t length = -1, FileSetContentsFlags flags = 0, int mode = 0666) throws FileError;
[CCode (cname = "g_file_get_contents")]
public static bool get_data (string filename, [CCode (type = "gchar**", array_length_type = "size_t")] out uint8[] contents) throws FileError;
[CCode (cname = "g_file_set_contents")]
@@ -3904,6 +3906,16 @@ namespace GLib {
public static bool close_checked (int fd) throws FileError;
}
+ [Flags]
+ [Version (since = "2.66")]
+ [CCode (cprefix = "G_FILE_SET_CONTENTS_", has_type_id = false)]
+ public enum FileSetContentsFlags {
+ NONE,
+ CONSISTENT,
+ DURABLE,
+ ONLY_EXISTING
+ }
+
[CCode (cname = "GStatBuf", cheader_filename = "glib/gstdio.h", has_type_id = false)]
public struct Stat {
public time_t st_atime;