You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Methods copy and move expect only a file as their $to argument
my $src = IO::Path.new('/home/zz/file.gz');
my $dest = IO::Path.new('/home/zz/tmp');
$src.move($dest);
Actual Behavior
Failed to move '/home/zz/zz.tar.gz' to '/home/zz/tmp': Failed to move file: illegal operation on a directory.
Expected Behavior
As a the good old 'cp' or 'mv' commands in Linux (move/copy the file into the target directory), as IO::Path has methods to identify files from directories, Make the 'move' and 'copy' a multi sub with a signature test for a file on $from and directory for $to.
That would be BTA 👍
Except if it breaks too much things ... or @zoffixznet 's heart :-)
Methods copy and move expect only a file as their $to argument
my $src = IO::Path.new('/home/zz/file.gz');
my $dest = IO::Path.new('/home/zz/tmp');
$src.move($dest);
Actual Behavior
Failed to move '/home/zz/zz.tar.gz' to '/home/zz/tmp': Failed to move file: illegal operation on a directory.
Expected Behavior
As a the good old 'cp' or 'mv' commands in Linux (move/copy the file into the target directory), as IO::Path has methods to identify files from directories, Make the 'move' and 'copy' a multi sub with a signature test for a file on $from and directory for $to.
That would be BTA 👍
Except if it breaks too much things ... or @zoffixznet 's heart :-)
Environment
perl6 -v
): Rakudo version 2017.10 MoarVM version 2017.10 Perl 6.c.The text was updated successfully, but these errors were encountered: