From: Marc-André Lureau Date: Fri, 17 Aug 2012 17:22:41 +0000 (+0300) Subject: glib-2.0: Add g_utime binding X-Git-Tag: 0.17.6~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b3c4971e2043780819bb40d9ed59c3a37db418e;p=thirdparty%2Fvala.git glib-2.0: Add g_utime binding Fixes bug 682115. --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 86855f85d..647924955 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -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);