Click here to get back home

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

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Recursive Directory Copy (with resource forks) in Mac OS X Jerry Krinock 04-02-2008
Get Chitika Premium
Posted by Jerry Krinock on April 2, 2008, 8:03 pm
Please log in for more thread options
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

Posted by jerrykrinock on April 3, 2008, 11:47 pm
Please log in for more thread options
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.perl6.internals/browse_thread/thread/1c11f0a67bde34c2/572e317b67a0c8e6?#572e317b67a0c8e6


Similar ThreadsPosted
Problem with recursive file/directory copy January 12, 2006, 6:14 am
FAQ 4.73 How do I print out or copy a recursive data structure? February 5, 2005, 12:03 am
FAQ 4.73 How do I print out or copy a recursive data structure? May 13, 2005, 11:03 am
FAQ 4.73 How do I print out or copy a recursive data structure? July 29, 2005, 4:03 pm
FAQ 4.73 How do I print out or copy a recursive data structure? September 25, 2005, 4:03 am
FAQ 4.73 How do I print out or copy a recursive data structure? November 6, 2005, 11:03 am
FAQ 4.73 How do I print out or copy a recursive data structure? January 28, 2006, 6:03 am
FAQ 4.73 How do I print out or copy a recursive data structure? March 7, 2006, 9:03 pm
FAQ 4.73 How do I print out or copy a recursive data structure? April 24, 2006, 3:03 am
FAQ 4.73 How do I print out or copy a recursive data structure? August 13, 2006, 3:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap