1

In mac OS X I can get charset and mimetype of file with this command

file -I /Users/bbb/Desktop/ba.py

And this command return this result

text/x-java; charset=us-ascii

Now I want get this mime type and charset in objective c without using NSTask or System() .

How I can get this info?

  • What have you attempted? – l'L'l Oct 01 '14 at 08:50
  • I used this link http://stackoverflow.com/questions/5996797/determine-mime-type-of-nsdata-loaded-from-a-file and http://stackoverflow.com/questions/1363813/how-can-you-read-a-files-mime-type-in-objective-c but they did not correct respond base on file command and not return charset – user3323552 Oct 02 '14 at 07:54

0 Answers0