Skip to content

Commit a8c6e4b

Browse files
committed
[IO::Path] document {,is-}{absolute,relative}; update TODOs
1 parent f585083 commit a8c6e4b

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

lib/Type/IO/Path.pod

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ unless when stated otherwise.
2525
2626
=for TODO
2727
28-
document the following methods: is-absolute, is-relative, absolute,
29-
relative, parent, child, copy,
28+
document the following methods: parent, child, copy, cleanup, resolve
3029
3130
=end for
3231

@@ -105,6 +104,30 @@ as the L<open> function accepts.
105104
Watches the path for modifications. Only implemented in Rakudo with the MoarVM
106105
backend at the moment.
107106

107+
=head2 method is-absolute
108+
109+
method is-absolute(IO::Path:D: --> Bool:D)
110+
111+
Returns C<True> if the path is an absolute path, and C<False> otherwise.
112+
113+
=head2 method is-relative
114+
115+
method is-relative(IO::Path:D: --> Bool:D)
116+
117+
Returns C<True> if the path is a relative path, and C<False> otherwise.
118+
119+
=head2 method absolute
120+
121+
method absolute (IO::Path:D: $base = ~$*CWD --> IO::Path:D)
122+
123+
Returns a new C<IO::Path> object that is an absolute path, based on C<$base>.
124+
125+
=head2 method relative
126+
127+
method relative (IO::Path:D: $base = ~$*CWD --> IO::Path:D)
128+
129+
Returns a new C<IO::Path> object relative to the C<$base> path.
130+
108131
=head2 method contents
109132
110133
method contents(IO::Path:D: Mu :$test = none('.', '..'))

0 commit comments

Comments
 (0)