Skip to content

Commit 027db9e

Browse files
committed
doc file test methods e,d,f,s,l,r,w,x,rw,rwx,z for IO::Path and
IO::Handle
1 parent 8e6f20a commit 027db9e

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

doc/Type/IO/Handle.pod6

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,72 @@ waiting for another keypress before the initial "e" is returned.
5050
5151
Returns C<True> if the read operations have exhausted the content of the file.
5252
53+
=head2 method e
54+
55+
method e(--> Bool)
56+
57+
Returns C<Bool::True> if the invocant is a valid path that exists.
58+
59+
=head2 method d
60+
61+
method d(--> Bool)
62+
63+
Returns C<Bool::True> if the invocant is a path and the directory exists.
64+
65+
=head2 method f
66+
67+
method f(--> Bool)
68+
69+
Returns C<Bool::True> if the invocant is a path and the file exists.
70+
71+
=head2 method s
72+
73+
method s(--> Bool)
74+
75+
Returns C<Bool::True> if the invocant is a path and the size is bigger then 0.
76+
77+
=head2 method l
78+
79+
method l(--> Bool)
80+
81+
Returns C<Bool::True> if the invocant is a path and a symlink.
82+
83+
=head2 method r
84+
85+
method r(--> Bool)
86+
87+
Returns C<Bool::True> if the invocant is a path and accessable.
88+
89+
=head2 method w
90+
91+
method w(--> Bool)
92+
93+
Returns C<Bool::True> if the invocant is a path and writeable.
94+
95+
=head2 method rw
96+
97+
method rw(--> Bool)
98+
99+
Returns C<Bool::True> if the invocant is a path, read and writeable.
100+
101+
=head2 method x
102+
103+
method x(--> Bool)
104+
105+
Returns C<Bool::True> if the invocant is a path and executable.
106+
107+
=head2 method rwx
108+
109+
method rwx(--> Bool)
110+
111+
Returns C<Bool::True> if the invocant is a path, executable, read and writeable.
112+
113+
=head2 method z
114+
115+
method z(--> Bool)
116+
117+
Returns C<Bool::True> if the invocant is a path and the size is 0.
118+
53119
=head2 method lines
54120
55121
method lines($limit = Inf)

doc/Type/IO/Path.pod6

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,72 @@ my $perl-files := gather while ( @stack ) {
232232
=for code :skip-test
233233
say $perl-files[1..3];
234234
235+
=head2 method e
236+
237+
method e(--> Bool)
238+
239+
Returns C<Bool::True> if the invocant is a valid path that exists.
240+
241+
=head2 method d
242+
243+
method d(--> Bool)
244+
245+
Returns C<Bool::True> if the invocant is a path and the directory exists.
246+
247+
=head2 method f
248+
249+
method f(--> Bool)
250+
251+
Returns C<Bool::True> if the invocant is a path and the file exists.
252+
253+
=head2 method s
254+
255+
method s(--> Bool)
256+
257+
Returns C<Bool::True> if the invocant is a path and the size is bigger then 0.
258+
259+
=head2 method l
260+
261+
method l(--> Bool)
262+
263+
Returns C<Bool::True> if the invocant is a path and a symlink.
264+
265+
=head2 method r
266+
267+
method r(--> Bool)
268+
269+
Returns C<Bool::True> if the invocant is a path and accessable.
270+
271+
=head2 method w
272+
273+
method w(--> Bool)
274+
275+
Returns C<Bool::True> if the invocant is a path and writeable.
276+
277+
=head2 method rw
278+
279+
method rw(--> Bool)
280+
281+
Returns C<Bool::True> if the invocant is a path, read and writeable.
282+
283+
=head2 method x
284+
285+
method x(--> Bool)
286+
287+
Returns C<Bool::True> if the invocant is a path and executable.
288+
289+
=head2 method rwx
290+
291+
method rwx(--> Bool)
292+
293+
Returns C<Bool::True> if the invocant is a path, executable, read and writeable.
294+
295+
=head2 method z
296+
297+
method z(--> Bool)
298+
299+
Returns C<Bool::True> if the invocant is a path and the size is 0.
300+
235301
=head2 routine slurp
236302
237303
multi method slurp(IO::Path:D: :$bin, :$enc)

0 commit comments

Comments
 (0)