Re: [MacPerl-Porters] default type/creator
[email protected] (Peter Prymmer)
| Newsgroups | perl.macperl.porters |
|---|---|
| Message-ID | <[email protected]> |
Isn't MacPerl::SetFileInfo() the way to go?
Here is an excerpt from macperl.pod:
MacPerl::SetFileInfo(CREATOR,TYPE,FILE...)
Changes the file types and creators of the file(s).
Examples:
MacPerl::SetFileInfo("MPS ", "TEXT", yin, yang);
Turn yin and yang into MPW text files
HTH.
Peter Prymmer
On Tue, 23 Oct 2001, Axel Rose wrote:
> Hello all,
>
> 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 '.
>
> It doesn't matter much if the application using this downloaded
> data ignores type/creator (.jpg, .pdf, .doc). But on the other
> hand if a user happens to double-click that data he might arrive
> in a text editor. Isn't it better to avoid wrong usage at all.
>
> I know how to avoid this by using MacBinary conversion.
> The conversion process needs time though and the programmer
> has to handle the extra files (.bin, .1). So if I care
> I can always reconstruct the original type/creator information.
>
> I believe patching Net::FTP is the wrong direction.
> MacPerl probably can't do much because it doesn't know
> whether I transfer in binary mode.
>
> 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?
>
>
> Thanks,
> Axel
>
> P.S.: In the moment I write an incremental download utility
> for a single application and more than hundred control files
> this application opens. This is the practical reason for trying
> to avoid unnecessary macbin conversions.
>
> Anybody interested to see the downloader which greatly helps
> in software installation can get a copy. I'd love to discuss
> it.
> --
> (signature intentionally left blank)
>