Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!cs.utexas.edu!henry!volta.ece.utexas.edu!po From: po@volta.ece.utexas.edu Newsgroups: comp.unix.questions Subject: Detecting type of file in a program Message-ID: <192@henry.ece.utexas.edu> Date: 4 Feb 89 02:54:24 GMT Sender: news@henry.ece.utexas.edu Reply-To: po@volta.ece.utexas.edu () Organization: ECE, U. T. Austin Lines: 8 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