[vala/staging] glib-2.0: Add GLib.File.set_contents_full() binding (since 2.66)
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] glib-2.0: Add GLib.File.set_contents_full() binding (since 2.66)
- Date: Sat, 1 Aug 2020 14:24:03 +0000 (UTC)
commit 3d529adef9848a7cc5098491fce4bc28bc608bd1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Aug 1 16:21:11 2020 +0200
glib-2.0: Add GLib.File.set_contents_full() binding (since 2.66)
vapi/glib-2.0.vapi | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]