in reply to file type
are what I would use. If you can't trust people to use the extensions appropriately, there is no other Unix way to differentiate (that I know of). Files are either binary or ascii (Update: AgentM has a good point below, and I don't want to belabor the issue). End of story. If you are intrepid, I suppose you could check the C source for things like #include <stdio.h> just for kicks, but I wouldn't rely on that any more than I would rely on #!/usr/bin/perl to indicate a Perl script.%extensions = ( 'c' => 'C Source', 'cpp' => 'C++ Source', 'pl' => 'Perl Script', 'dat' => 'Data (Text?) File', 'csv' => 'Comma Separated Values', 'txt' => 'Text' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: file type
by AgentM (Curate) on Feb 09, 2001 at 03:53 UTC | |
by sierrathedog04 (Hermit) on Feb 09, 2001 at 10:59 UTC |