Detecting type of file in a program

po at volta.ece.utexas.edu po at volta.ece.utexas.edu
Sat Feb 4 12:54:24 AEST 1989


In my program, I am using opendir() to read in the names of 
text files from a directory.
How can I tell whether a file is text or an object file ?
Is there a better way than using :
	system("file filename > /tmp/tempfile")

Thanks,
  Po 



More information about the Comp.unix.questions mailing list