From: Rico Tzschichholz Date: Sat, 1 Aug 2020 14:21:11 +0000 (+0200) Subject: glib-2.0: Add GLib.File.set_contents_full() binding (since 2.66) X-Git-Tag: 0.49.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d529adef9848a7cc5098491fce4bc28bc608bd1;p=thirdparty%2Fvala.git glib-2.0: Add GLib.File.set_contents_full() binding (since 2.66) --- 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;