1

I'm developing a Xamarin app and there are cases where I have to interact with files from other apps. I'm working with files which have a filename like example.txt.xyz because another app appended .xyz to the filename. Unfortunately, many Android apps such as Samsungs E-Mail don't give me the full filename when they pass a file but instead pass RAW as the filename.

Is there a way in .net standard, C#, Xamarin or Android where I can still figure out the true filetype (.txt in the above example)?

Given that I'm within Xamarin I don't have access to the full .net functions and can't rely on Internet Explorer as done in a previous question.

Christian
  • 21,975
  • 33
  • 117
  • 195
  • 3
    Possible duplicate of [In C#, how can I know the file type from a byte\[\]?](https://stackoverflow.com/questions/1654846/in-c-how-can-i-know-the-file-type-from-a-byte) – Oliver Dalton Mar 07 '19 at 10:27
  • https://stackoverflow.com/questions/1886866/how-to-find-the-extension-of-a-file – Mihir Dave Mar 07 '19 at 10:28
  • this [link](https://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature) might help, you need to know the mime-type of the file – Abhinaw Kaushik Mar 07 '19 at 12:07

0 Answers0