Skip to content

Commit

Permalink
Add createonly to rename(). See RT #125280.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdv committed Jun 11, 2015
1 parent d58e397 commit 897bef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/io_operators.pm
Expand Up @@ -227,8 +227,8 @@ multi sub mkdir($path, $mode = 0o777, :$SPEC = $*SPEC, :$CWD = $*CWD) {
$path.IO(:$SPEC,:$CWD).mkdir($mode) ?? ($path,) !! ();
}

sub rename($from, $to, :$SPEC = $*SPEC, :$CWD = $*CWD) {
my $result := $from.IO(:$SPEC,:$CWD).rename($to,:$SPEC,:$CWD);
sub rename($from, $to, :$SPEC = $*SPEC, :$CWD = $*CWD, :$createonly) {
my $result := $from.IO(:$SPEC,:$CWD).rename($to,:$SPEC,:$CWD,:$createonly);
$result // $result.throw;
}
sub copy($from, $to, :$SPEC = $*SPEC, :$CWD = $*CWD) {
Expand Down

0 comments on commit 897bef2

Please sign in to comment.