[Monodevelop-patches-list] r642 - in trunk/MonoDevelop/samples: . VFS
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jan 24 22:36:47 EST 2004
Author: jluke
Date: 2004-01-24 22:36:47 -0500 (Sat, 24 Jan 2004)
New Revision: 642
Added:
trunk/MonoDevelop/samples/VFS/
trunk/MonoDevelop/samples/VFS/Makefile
trunk/MonoDevelop/samples/VFS/test.cs
trunk/MonoDevelop/samples/VFS/test.txt
Log:
add test
Added: trunk/MonoDevelop/samples/VFS/Makefile
===================================================================
--- trunk/MonoDevelop/samples/VFS/Makefile 2004-01-25 03:13:46 UTC (rev 641)
+++ trunk/MonoDevelop/samples/VFS/Makefile 2004-01-25 03:36:47 UTC (rev 642)
@@ -0,0 +1,12 @@
+MCS = mcs
+RUNTIME = mono
+
+all:
+ $(MCS) -g test.cs -o ../../build/bin/VfsTest.exe \
+ /r:../../build/bin/MonoDevelop.Gui.dll
+
+run:
+ $(RUNTIME) --debug ../../build/bin/VfsTest.exe
+
+clean:
+ rm ../../build/bin/VfsTest.exe
Added: trunk/MonoDevelop/samples/VFS/test.cs
===================================================================
--- trunk/MonoDevelop/samples/VFS/test.cs 2004-01-25 03:13:46 UTC (rev 641)
+++ trunk/MonoDevelop/samples/VFS/test.cs 2004-01-25 03:36:47 UTC (rev 642)
@@ -0,0 +1,26 @@
+using System;
+using System.IO;
+using MonoDevelop.Gui;
+
+class T
+{
+ static void Main ()
+ {
+ Vfs.Init ();
+ Console.WriteLine (Vfs.Initialized);
+ string test_file = Path.Combine (Environment.CurrentDirectory, "test.txt");
+ if (File.Exists (test_file))
+ {
+ string mt = Vfs.GetMimeType (test_file);
+ Console.WriteLine (Vfs.IsKnownType (mt));
+ string icon = Vfs.GetIcon (mt);
+ Console.WriteLine (mt);
+ Console.WriteLine (icon);
+ }
+ else
+ {
+ Console.WriteLine (test_file + " does not exist");
+ }
+ Vfs.Shutdown ();
+ }
+}
Added: trunk/MonoDevelop/samples/VFS/test.txt
===================================================================
--- trunk/MonoDevelop/samples/VFS/test.txt 2004-01-25 03:13:46 UTC (rev 641)
+++ trunk/MonoDevelop/samples/VFS/test.txt 2004-01-25 03:36:47 UTC (rev 642)
@@ -0,0 +1 @@
+hello world
More information about the Monodevelop-patches-list
mailing list