summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-08-17 20:22:41 +0300
committerJürg Billeter <j@bitron.ch>2012-09-03 19:01:29 +0200
commit0b3c4971e2043780819bb40d9ed59c3a37db418e (patch)
tree012c1fa415367f9e21d8b480e8ef06596b5a1881
parent8558316a4c40fa8efbf6a7e128fddb9d864ce432 (diff)
downloadvala-0b3c4971e2043780819bb40d9ed59c3a37db418e.tar.gz
glib-2.0: Add g_utime binding
Fixes bug 682115.
-rw-r--r--vapi/glib-2.0.vapi8
1 files changed, 8 insertions, 0 deletions
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);