[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Portable way to implement GetFileInfo?



>if ($^O =~ 'Win32') {
>    @assoc=`assoc`;
>    @ftype=`ftype`;

This will only work on NT. Better (and probably faster) to use the registry
to get the file type (and associated application and executable name).

But as has been mentioned, if there is no extension, there is only the
heuristics method of examining the content: easy and reliable for certain
types, but probably impossible for a lot of others (most?), and a lot of
work anyway if you need to recognize many file types.


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org