Skip to content

Commit eca21ff

Browse files
authored
[io grant] Document copy/move behaviour for same target/source
RT#131242: https://rt.perl.org/Ticket/Display.html?id=131242 Rakudo fix: rakudo/rakudo@08a8075f91 Tests: Raku/roast@4fdb8504cd
1 parent 8016512 commit eca21ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/Type/IO/Path.pod6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,8 @@ Defined as:
715715
716716
Copies a file. Returns C<True> on success; L<fails|/routine/fail>
717717
with L<X::IO::Copy> if C<:$createonly> is C<True> and the C<$to> path already
718-
exists or if the operation failed for some other reason.
718+
exists or if the operation failed for some other reason, such as when
719+
C<$to> and C<$from> are the same file.
719720
720721
=head2 routine move
721722
@@ -727,7 +728,8 @@ Defined as:
727728
Copies a file and then removes the original. If removal fails, it's possible
728729
to end up with two copies of the file. Returns C<True> on success;
729730
L<fails|/routine/fail> with L<X::IO::Move> if C<:$createonly> is C<True> and
730-
the C<$to> path already exists or if the operation failed for some other reason.
731+
the C<$to> path already exists or if the operation failed for some other reason,
732+
such as when C<$to> and C<$from> are the same file.
731733
732734
To avoid copying, you can use L«C<rename>|/routine/rename», if the files are on
733735
the same storage device. It also works with directories, while C<move> does not.

0 commit comments

Comments
 (0)