Skip to content

Commit 50e5565

Browse files
committed
[io grant] Document IO::Spec::*.catdir and .catfile
1 parent 28b6283 commit 50e5565

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

doc/Type/IO/Spec/Cygwin.pod6

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@ the routine does not access the filesystem.
4040
IO::Spec::Cygwin.canonpath("foo///./../bar/../ber", :parent).say;
4141
# OUTPUT: «ber␤»
4242
43+
=head2 method catdir
44+
45+
method catdir (*@parts --> Str:D)
46+
47+
Concatenates multiple path fragments and returns the canonical representation
48+
of the resultant path as a string. The C<@parts> are L«C<Str>|/type/Str» objects
49+
and are allowed to contain path separators.
50+
51+
IO::Spec::Cygwin.catdir(<foo/bar ber perl>).say;
52+
# OUTPUT: «foo/bar/ber/perl␤»
53+
54+
=head2 method catfile
55+
56+
Alias for L«C<catdir>|/routine/catdir».
57+
4358
=head2 method tmpdir
4459
4560
Defined as:

doc/Type/IO/Spec/Unix.pod6

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ the routine does not access the filesystem, so no symlinks are followed.
5050
IO::Spec::Unix.canonpath("foo///./../bar/../ber", :parent).say;
5151
# OUTPUT: «ber␤»
5252
53+
=head2 method catdir
54+
55+
method catdir (*@parts --> Str:D)
56+
57+
Concatenates multiple path fragments and returns the canonical representation
58+
of the resultant path as a string. The C<@parts> are L«C<Str>|/type/Str» objects
59+
and are allowed to contain path separators.
60+
61+
IO::Spec::Unix.catdir(<foo/bar ber perl>).say; # OUTPUT: «foo/bar/ber/perl␤»
62+
63+
=head2 method catfile
64+
65+
Alias for L«C<catdir>|/routine/catdir».
66+
5367
=head2 method tmpdir
5468
5569
Defined as:

doc/Type/IO/Spec/Win32.pod6

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ the routine does not access the filesystem.
4545
IO::Spec::Win32.canonpath("C:/foo///./../bar/../ber", :parent).say;
4646
# OUTPUT: «C:\ber␤»
4747
48+
=head2 method catdir
49+
50+
method catdir (*@parts --> Str:D)
51+
52+
Concatenates multiple path fragments and returns the canonical representation
53+
of the resultant path as a string. The C<@parts> are L«C<Str>|/type/Str» objects
54+
and are allowed to contain path separators.
55+
56+
IO::Spec::Win32.catdir(<foo/bar ber perl>).say;
57+
# OUTPUT: «foo\bar\ber\perl␤»
58+
59+
=head2 method catfile
60+
61+
Alias for L«C<catdir>|/routine/catdir».
62+
4863
=head2 method tmpdir
4964
5065
Defined as:

0 commit comments

Comments
 (0)