parrot/parrot — Issue #229: the copy method in the File dynpmc does not accept a directory as destination
Author: moritz
Created: 2011-12-12 15:41:58+00:00
State: open
Labels: bug

As the title says. Easily demonstrated with Rakudo (but independent of rakudo, of course)

$ ./perl6 -e 'pir::new__PS("File").copy("README", "/tmp/")'
Is a directory

Yes, I know that it's a directory. And I want to copy it. Is that too much to ask? :-) (the documentation says the destination must be a path, and a directory name surely is a path).

(As a side note, the error message is very ambiguous. What is a directry? Source or destination? Care to include a file name in the error message?)