Skip to content

Commit 6e17351

Browse files
committed
Adds another sentence clarifying behavior of unlink
Also some possible explanation of the rationale of including non-existing files in the output list. Refs #2096, does not close, because it's been closed already. Thanks again @briandfoy for the report, and sorry for not understanding the problem from the beginning.
1 parent 46d35a3 commit 6e17351

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/Type/IO/Path.pod6

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,10 +1009,15 @@ Defined as:
10091009
Delete all specified ordinary files, links, or symbolic links for which there
10101010
are privileges to do so. See L<rmdir> to delete directories.
10111011
1012-
The subroutine form returns the names of the files that were successfully
1013-
deleted. The method form returns C<True> on success, or L<fails|/routine/fail>
1014-
with L<X::IO::Unlink> if the operation could not be completed. If the file
1015-
to be deleted does not exist, the routine treats it as success.
1012+
The subroutine form returns the names of all files, excluding those that exist,
1013+
but could not be deleted; this obviously includes the names of the files that do
1014+
not exist, the rationaly possibly being that it returns the names of the files
1015+
that C<do not exist> after the operation, without taking into account if they
1016+
existed before the operation or not.
1017+
1018+
The method form returns C<True> on success, or L<fails|/routine/fail>
1019+
with L<X::IO::Unlink> if the operation could not be completed. If the file to be
1020+
deleted does not exist, the routine treats it as success.
10161021
10171022
=begin code
10181023
'foo.txt'.IO.open(:w).close;

0 commit comments

Comments
 (0)