Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top