How to know a file is a text file ? Like *.txt, *.c, *.cpp, etc. Not binary file like *.pdf, *.jpg, *.exe, etc.
In linux, file extension is not important right ? So, I think detecting by file extension is not a good way...

Thank's before...