in reply to Copying a directory and its contents while displaying a status
Wow.
Really wow.
This does work, but at first it really seemed to me like it couldn't work. I didn't understand it yesterday, didn't understand it today, even downvoted it, got suspicious when I saw its noderep, tried to write a reply where I argue how this can't possibly work, and only understood how it could work during that. So I downloaded the cpan module, tested it, and it worked.
It might have been better if you wrote a bit more comments about it.
For anyone else puzzled, this overrides a private function from the File::Copy::Recursive cpan module. That function is called recursively on each file so this overriding code can print a debug output saying what file is copied. The title is confusing, because it doesn't actually display a progress bar, only prints the name of each file as it's copied. You use the code by calling the dircopy function with a source and target directory name.
Update: By the way, I won't use this code, because I don't seem to ever need copying files recursively from a script, and because cp -av works well enough.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Copying a directory and its contents while displaying a progress bar
by hiseldl (Priest) on Aug 08, 2008 at 02:14 UTC |