Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JJ committed Jun 12, 2018
1 parent 46d35a3 commit 6e17351
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions doc/Type/IO/Path.pod6
Expand Up @@ -1009,10 +1009,15 @@ Defined as:
Delete all specified ordinary files, links, or symbolic links for which there
are privileges to do so. See L<rmdir> to delete directories.
The subroutine form returns the names of the files that were successfully
deleted. The method form returns C<True> on success, or L<fails|/routine/fail>
with L<X::IO::Unlink> if the operation could not be completed. If the file
to be deleted does not exist, the routine treats it as success.
The subroutine form returns the names of all files, excluding those that exist,
but could not be deleted; this obviously includes the names of the files that do
not exist, the rationaly possibly being that it returns the names of the files
that C<do not exist> after the operation, without taking into account if they
existed before the operation or not.
The method form returns C<True> on success, or L<fails|/routine/fail>
with L<X::IO::Unlink> if the operation could not be completed. If the file to be
deleted does not exist, the routine treats it as success.
=begin code
'foo.txt'.IO.open(:w).close;
Expand Down

0 comments on commit 6e17351

Please sign in to comment.