Skip to content

Commit 914c100

Browse files
committed
[io grant] Finish up IO::Path.dirname
- Add links to volume/basename - Include an example with IO::Path that has a volume
1 parent 64355c8 commit 914c100

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/Type/IO/Path.pod6

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ Defined as:
259259
method dirname(IO::Path:D:)
260260
261261
Returns the directory name portion of the path object. That is, it returns
262-
the path excluding the volume and the base name.
263-
264-
say IO::Path.new("/home/camelia/myfile.p6").dirname; # OUTPUT: «/home/camelia␤»
265-
say IO::Path.new("/home/camelia").dirname; # OUTPUT: «/home␤»
266-
say IO::Path.new("/home").dirname; # OUTPUT: «/␤»
262+
the path excluding the L<volume|/routine/volume> and the
263+
L<base name|/routine/basename>.
267264
265+
say IO::Path.new("/home/camelia/myfile.p6").dirname; # OUTPUT: «/home/camelia␤»
266+
say IO::Path::Win32.new("C:/home/camelia").dirname; # OUTPUT: «/home␤»
267+
say IO::Path.new("/home").dirname; # OUTPUT: «/␤»
268268
269269
=head2 method volume
270270

0 commit comments

Comments
 (0)