[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Binary or text.

Trifles make perfection, and perfection is no trifle.
		-- Michelangelo

> How can I make out if a file is binary or text given its path?

You can't. The system does not recognise file types. The semantics of a
file are determined by the program reading the file and not by the file
You could read a bit of the file and make some intelligent guesses using
the magic no. or something. Kinda like the file command but thats it.