[vala] glib-2.0: Add g_utime binding



commit 0b3c4971e2043780819bb40d9ed59c3a37db418e
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Fri Aug 17 20:22:41 2012 +0300

    glib-2.0: Add g_utime binding
    
    Fixes bug 682115.

 vapi/glib-2.0.vapi |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 86855f8..6479249 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]