How to check if a file is a textfile?
- by daniels
I have a folder full of files and i want to search some string inside them. The issue is that some files may be zip,exe,ogg,etc.
Can i check somehow what kind of file is it so i only open and search through txt, php, etc files.
I can't rely on the file extension.