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

[MacPerl] HELP - FileCopy doesn't !



The subject sums my problem up - FileCopy::copy doesn't copy a file
correctly. It only copies the data fork, not the resource fork,  and it
does not maintain the file type/creator information. (I know this because I
was first copying to a Netatalk volume, where I can easily see the two
forks separately. The problem, however, is NOT netatalk related, as it also
happens when copying from and to a local disk). When this happened, I
immediately RTFPM and saw syscopy. I'd read of this before but as my
previous Perl experience has been all Unix based, I hadn't needed it. So, a
quick mod. to my code to use syscopy and . . . NADA - same result - it just
copies the data fork.

Does anyone know why this happens ? Is it normal behaviour ? If so, it
seems I would have two choices

1) Use Applescript and tell the Finder to copy the files (the Perl program
is replacing an Applescript which does this, so I know that works :-). Of
course, I don't know if it'll work from MacPerl.

2) Delve deeply into Mac::Resources - I'm sure that somewhere there is code
which will read all resources from one file and write them to another, or
at least the basis of such code.

1) is a horrible kludge and 2) sounds like a lot of hard work, particularly
for someone who knows that "Inside Macintosh" is a series of books, and
nothing much else. And I've never forgotten something I read in the early
days of the Mac to the effect that  "Inside Macintosh" consists of 12
volumes, and a complete understanding of the other 11 is a pre-requisite to
understanding any particular one. :-)

So, help please MacPerlers - how do I do this ? I can't believe I'm the
first to want to.


Kindest regards,


Niall  O Broin

UNIX Network Administrator               Ground Systems Engineering
Department
European Space Operations Centre         nobroin@esoc.esa.de
Darmstadt, Germany                 Ph./Fax  +49 6151 90 3619/2179



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