GtkSharp/sample/gnomevfs/TestInfo.cs
Mike Kestner 32aa6d0788 2005-01-12 Mike Kestner <mkestner@novell.com>
* sample/gnomevfs/*.cs : s/Test.Gnome.VFS/TestGnomeVfs to avoid
	namespace collision problems with current mcs.

svn path=/trunk/gtk-sharp/; revision=38788
2005-01-12 15:34:09 +00:00

28 lines
593 B
C#

using Gnome.Vfs;
using System;
using System.Text;
namespace TestGnomeVfs {
public class TestInfo {
static void Main (string[] args)
{
if (args.Length != 1) {
Console.WriteLine ("Usage: TestInfo <uri>");
return;
}
Gnome.Vfs.Vfs.Initialize ();
Gnome.Vfs.Uri uri = new Gnome.Vfs.Uri (args[0]);
FileInfoOptions options = FileInfoOptions.GetMimeType |
FileInfoOptions.FollowLinks |
FileInfoOptions.GetAccessRights;
FileInfo info = uri.GetFileInfo (options);
Console.WriteLine (info.ToString ());
Gnome.Vfs.Vfs.Shutdown ();
}
}
}