[vala/0.6] posix: Add opendir and friends



commit df8976f8181de0cfead6f6fd41f47c15faf639b7
Author: Michael 'Mickey' Lauer <mickey vanille-media de>
Date:   Mon Mar 16 16:13:58 2009 +0100

    posix: Add opendir and friends
    
    Signed-off-by: Michael 'Mickey' Lauer <mlauer vanille-media de>
---
 vapi/posix.vapi |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index d9633a2..ff376bd 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -56,6 +56,36 @@ namespace Posix {
 	[CCode (cheader_filename = "ctype.h")]
 	public int toupper (int c);
 
+	[Compact]
+	[CCode (cname = "struct dirent", cheader_filename = "dirent.h")]
+	public class DirEnt {
+		public ino_t d_ino;
+		public off_t d_off;
+		public ushort d_reclen;
+		public char d_type;
+		public char[265] d_name;
+		}
+
+	[Compact]
+	[CCode (cname = "DIR", free_function = "closedir", cheader_filename = "dirent.h")]
+	public class Dir {
+	}
+
+	[CCode (cheader_filename = "dirent.h")]
+	public int dirfd (Dir dir);
+	[CCode (cheader_filename = "dirent.h")]
+	public Dir? opendir (string filename);
+	[CCode (cheader_filename = "dirent.h")]
+	public Dir? fdopendir (int fd);
+	[CCode (cheader_filename = "dirent.h")]
+	public unowned DirEnt? readdir (Dir dir);
+	[CCode (cheader_filename = "dirent.h")]
+	public void rewinddir (Dir dir);
+	[CCode (cheader_filename = "dirent.h")]
+	public void seekdir (Dir dir, long pos);
+	[CCode (cheader_filename = "dirent.h")]
+	public long telldir (Dir dir);
+
 	[CCode (cheader_filename = "errno.h")]
 	public int errno;
 	[CCode (cheader_filename = "errno.h")]



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