]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add g_utime binding
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Fri, 17 Aug 2012 17:22:41 +0000 (20:22 +0300)
committerJürg Billeter <j@bitron.ch>
Mon, 3 Sep 2012 17:01:29 +0000 (19:01 +0200)
Fixes bug 682115.

vapi/glib-2.0.vapi

index 86855f85d3f4c46c83036341e661c5ca866c3a17..6479249551a6809653d21e2020123eb274808eae 100644 (file)
@@ -3043,6 +3043,12 @@ namespace GLib {
                }
        }
 
+       [CCode (cname = "struct utimbuf", cheader_filename = "sys/types.h,utime.h")]
+       public struct UTimBuf {
+               time_t actime;       /* access time */
+               time_t modtime;      /* modification time */
+       }
+
        [CCode (lower_case_cprefix = "g_file_", cheader_filename = "glib/gstdio.h")]
        namespace FileUtils {
                public static bool get_contents (string filename, out string contents, out size_t length = null) throws FileError;
@@ -3066,6 +3072,8 @@ namespace GLib {
                public static int unlink (string filename);
                [CCode (cname = "g_chmod")]
                public static int chmod (string filename, int mode);
+               [CCode (cname = "g_utime")]
+               public static int utime (string filename, UTimBuf? times = null);
                
                [CCode (cname = "symlink")]
                public static int symlink (string oldpath, string newpath);