Re: [MacPerl-Porters] default type/creator
[email protected] (Chris Nandor)
| Newsgroups | perl.macperl.porters |
|---|---|
| Message-ID | <p05100304b7fba519a274@[10.0.1.177]> |
At 23:25 +0200 2001.10.23, Axel Rose wrote:
>using Net::FTP I wonder about the following:
> $ftp->binary;
> $ftp->get( $remote_file, $local_file );
>The local file has type/creator set to TEXT/'MPS '.
I can't recall the specifics, but what I do remember is that when I use
LWP::Simple::mirror(), that it ends up with my Internet Config prefs for
the file type/creator. I *think* this is because of QuickTime Exchange
(one of the QuickTime preferences) or something.
Hm, on second look, it looks to ignore the IC prefs, and just make it a
QuickTime file. Interesting.
>Therefore a preference like in Fetch or BetterTelnet
>would be most ideal to specify which type/creator
>to use for downloads. Perhaps even Internet config
>mappings could be used.
>
>But of course this is much work and obviously nobody
>depends on it.
>
>What could be done in short term is to change default
>type/creator to something like 'BINA'/'????'.
>Is this sensible?
In lieu of allowing some OS software to handle it, I'd suggest handling it
somewhat manually, as Peter said. Consider:
use MacPerl 'SetFileInfo';
use Mac::InternetConfig;
$ftp->get( $remote_file, $local_file );
my $map = $InternetConfigMap{$local_file};
MacPerl::SetFileInfo($map->file_creator, $map->file_type, $local_file);
--
Chris Nandor [email protected] http://pudge.net/
Open Source Development Network [email protected] http://osdn.com/