Skip to content

Commit ae6d2af

Browse files
author
Jan-Olof Hendig
committed
Added docs for the method 'resolve' in IO::Path
1 parent 16fd361 commit ae6d2af

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/Type/IO/Path.pod

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,18 @@ needed and returns the result as a new C<IO::Path>.
160160
my $io = IO::Path.new( "/bin" );
161161
say $io.child('netstat'); # "/bin/netstat".IO
162162
163+
=head2 method resolve
164+
165+
method resolve(IO::Path:D: --> IO::Path)
166+
167+
Returns a new C<IO::Path> object with all symbolic links and references to the
168+
parent directory (C<..>) physically resolved. This means that the
169+
filesystem is examined for each directory in the path, and any symlinks found
170+
are followed.
171+
172+
# bar is a symlink pointing to "/baz"
173+
my $io = "foo/./bar/..".IO.resolve; # now "/" (the parent of "/baz")
174+
163175
=head2 routine dir
164176
165177
sub dir(Cool $path = '.', Mu :$test = none('.', '..'))

0 commit comments

Comments
 (0)