Skip to content

Commit a1cb80b

Browse files
committed
[io grant] Document IO::Spec::Win32.basename
1 parent aa293f9 commit a1cb80b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/Type/IO/Spec/Win32.pod6

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ need to use C<IO::Spec::*>. Use L«C<IO::Path>|/type/IO::Path» instead..
1616
1717
=head1 Methods
1818
19+
=head2 method basename
20+
21+
method basename(Str:D $path --> Str:D)
22+
23+
Takes a path as a string and returns a possibly-empty portion after the last
24+
slash or backslash:
25+
26+
IO::Spec::Win32.basename("foo/bar/") .perl.say; # OUTPUT: «""␤»
27+
IO::Spec::Win32.basename("foo/bar\\").perl.say; # OUTPUT: «""␤»
28+
IO::Spec::Win32.basename("foo/bar/.").perl.say; # OUTPUT: «"."␤»
29+
IO::Spec::Win32.basename("foo/bar") .perl.say; # OUTPUT: «"bar"␤»
30+
1931
=head2 method tmpdir
2032
2133
Defined as:

0 commit comments

Comments
 (0)