views:

39

answers:

1

How do i get the file type in Mono? i.e. "*.txt" => "Text Document", "*.jpg" => "JPEG Image". Similar to what SHFILEINFO.szTypeName returns with P/Invoke on Windows.

+3  A: 

There is no cross-platform API for this. On Linux you can use GIO, and there are native APIs on Mac too though I don't know them offhand. On Windows you can P/Invoke from Mono.

mhutch
Thank you. I'm adding a reference to GIO docs here: http://library.gnome.org/devel/gio/stable/index.html
Ozgur Ozcitak