File: TestMime.cs

package info (click to toggle)
gtk-sharp2 2.8.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 21,208 kB
  • ctags: 5,843
  • sloc: xml: 245,420; cs: 24,183; sh: 8,547; ansic: 2,739; makefile: 1,582; perl: 1,177
file content (25 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Gnome.Vfs;
using System;
using System.Reflection;
using System.Runtime.CompilerServices;

namespace TestGnomeVfs {
	public class TestMime {
		static void Main (string[] args)
		{
			if (args.Length != 1) {
				Console.WriteLine ("Usage: TestSync <uri>");
				return;
			}
		
			Gnome.Vfs.Vfs.Initialize ();
			
			Gnome.Vfs.Uri uri = new Gnome.Vfs.Uri (args[0]);

			MimeType mimetype = uri.MimeType;
			Console.WriteLine ("Uri `{0}' looks like ", uri, mimetype.Name);
			
			Gnome.Vfs.Vfs.Shutdown ();
		}
	}
}