Re: [MacPerl-Porters] default type/creator

[email protected] (Axel Rose)
Newsgroups perl.macperl.porters
Message-ID <p04330104b7fc851e5544@[172.16.172.241]>
Thanks to all for the good explanations.
I have no problems to find or to set the proper type/creator
after the ftp download.

The question just came up because in my case I download
some hundred files which are purely binary. I don't want
to macbinarize them because of the extra time.

And - I could avoid explicitely setting type/creator if
MacPerl would use another default (not MPS /TEXT).

Let me speak in code:

  $ftp->get( $file );
  if( $file =~ /\.bin$/ ) { demacbin( $file  }
  else {
    # avoid TEXT type MacPerl sets by default
    MacPerl::SetFileInfo( '????', 'BINA', $file );
    # a global MacPerl preference for ????/BINA would be ideal
  }

I upload files with a resource fork as .bin files.
Files without a resource fork are uploaded without change.
After download I would end from nothing to MPS /TEXT.

If MacPerl doesn't know anything about a file I create
with Net::FTP should MacPerl set type to TEXT?


Just thinking about a really unimportant detail ... :)


Axel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.