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

Re: [MacPerl] Creating a Resource Fork in a Text File Createdwith MacPerl



At 5:28 pm +0100 05.11.97, Philippe de Rochambeau wrote:
>How do you create a resource fork in a text file which you have just created
>with the Perl 'open' command? ... I am currently writing a program that
>creates HTML files on the fly. I would like to create resource forks in
>those files so that they appear as BBEdit files. Changing the files'
>Creator does not make them appear as BBedit files because they lack resource
>forks ...

Adding a resource fork won't make your file any more or less of a BBEdit
file. The type and creator are stored in the file's Finder Info, which is
separate from the resource fork. If changing the creator doesn't make your
files appear as BBEdit files, then you're either doing something wrong or -
at a guess - your desktop needs rebuilding.

If you call:

	MacPerl::SetFileInfo("R*ch","TEXT",$pathname);

(where '$pathname' is the full path to your file) it should work just fine
(it does for me). If this fails to work, print out the pathname to make
sure that you're feeding it the right information. If that checks out, try
rebuilding your desktop. And if that doesn't work ... well, I don't know
what you should do, but don't waste time adding resource forks.

					A


--
angus@pobox.com                                   http://pobox.com/~angus/

 "My loathings are simple: stupidity,            [Vladimir Nabokov]
  oppression, crime, cruelty, soft music."



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch