[Monodevelop-patches-list] r638 - in trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui: . VFS

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Jan 24 21:30:21 EST 2004


Author: jluke
Date: 2004-01-24 21:30:21 -0500 (Sat, 24 Jan 2004)
New Revision: 638

Added:
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs
Log:
testing a couple vfs things


Added: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs	2004-01-25 01:27:26 UTC (rev 637)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs	2004-01-25 02:30:21 UTC (rev 638)
@@ -0,0 +1,24 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace MonoDevelop.Gui
+{
+	public class Vfs
+	{
+		[DllImport ("gnomevfs-2")]
+		static extern string gnome_vfs_mime_type_from_name (string filename);
+		
+		[DllImport ("gnomevfs-2")]
+		static extern string gnome_vfs_mime_type_from_name_or_default (string filename, string defaultval);
+
+		public static string GetMimeType (string filename)
+		{
+			return gnome_vfs_mime_type_from_name (filename);
+		}
+		
+		public static string GetMimeTypeDefault (string filename, string defaultval)
+		{
+			return gnome_vfs_mime_type_from_name_or_default (filename, defaultval);
+		}
+	}
+}




More information about the Monodevelop-patches-list mailing list