Skip to content

Commit 1527d32

Browse files
committed
[io grant] Document :completely arg to IO::Path.resolve
Rakudo impl: rakudo/rakudo@6a8d63d1b6 Tests: Raku/roast@a809f0f1f5
1 parent ca4a5d8 commit 1527d32

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
@@ -308,17 +308,22 @@ needed and returns the result as a new C<IO::Path>.
308308
309309
=head2 method resolve
310310
311-
method resolve(IO::Path:D: --> IO::Path)
311+
method resolve(IO::Path:D: :$completely --> IO::Path)
312312
313313
Returns a new C<IO::Path> object with all symbolic links and references to the
314-
parent directory (C<..>) resolved. This means that the filesystem is examined
314+
parent directory (C<..>) resolved. This means that the filesystem is examined
315315
for each directory in the path, and any symlinks found are followed.
316316
317317
# bar is a symlink pointing to "/baz"
318318
my $io = "foo/./bar/..".IO.resolve; # now "/" (the parent of "/baz")
319319
320-
NOTE: Currently (May 2016) this method doesn't work correctly on all platforms,
321-
e.g. Windows, since it assumes POSIX semantics.
320+
If C<$completely>, which defaults to C<False>, is set to a true value, the
321+
method will L«C<fail>|/routine/fail» if it cannot completely resolve the path,
322+
otherwise, it will resolve as much as possible, and will merely perform
323+
L«C<cleanup>|/routine/cleanup» of the rest of the path.
324+
325+
NOTE: Currently (April 2017) this method doesn't work correctly on all
326+
platforms, e.g. Windows, since it assumes POSIX semantics.
322327
323328
=head2 routine dir
324329

0 commit comments

Comments
 (0)