Recursive Directory Copy (with resource forks) in Mac OS X

J

Jerry Krinock

At least for me, the module function File::Copy::Recursive::dircopy()
seems to not copy resource forks of descendant files when used in Mac
OS X.

Has anyone else noticed this? What's a good method for copying
directories in Mac OS X? Call system() to invoke cp?

Thanks,

Jerry Krinock
 
J

jerrykrinock

After looking into the source for File::Copy::Recursive I see that
this is due to its reliance on the copy() method in the superclass
File::Copy. And all of this is due to the fact that perl does not
have a built-in "copy file" function, which is well-known and seems to
have been discussed by people smarter than me who are discussing
whether or not to fix it in perl 6 [1]. So, I'll just use my own
workaround of calling system() to invoke darwin's cp (which copies
resource forks in Mac OS 10.4 or later).

[1] http://groups.google.com/group/perl...a67bde34c2/572e317b67a0c8e6?#572e317b67a0c8e6
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top