]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: add GLib.FileUtils.get/set_data methods
authorEvan Nemerson <evan@coeus-group.com>
Thu, 29 Apr 2010 15:41:17 +0000 (08:41 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Thu, 29 Apr 2010 16:44:16 +0000 (09:44 -0700)
vapi/glib-2.0.vapi

index b864b34eaacd78050b105238c84bfc4beca45dd9..404dc7abb17984f9f42c4ba6ee22a994aabc7c48 100644 (file)
@@ -2600,6 +2600,10 @@ namespace GLib {
        namespace FileUtils {
                public static bool get_contents (string filename, out string contents, out size_t length = null) throws FileError;
                public static bool set_contents (string filename, string contents, ssize_t length = -1) 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")]
+               public static bool set_data (string filename, [CCode (type = "const char*", array_length_type = "size_t")] uint8[] contents) throws FileError;
                public static bool test (string filename, FileTest test);
                public static int open_tmp (string tmpl, out string name_used) throws FileError;
                public static string read_link (string filename) throws FileError;