@@ -52,67 +52,67 @@ Returns C<True> if the read operations have exhausted the content of the file.
52
52
53
53
= head2 method e
54
54
55
- method e(--> Bool)
55
+ method e returns Bool
56
56
57
57
Returns C < Bool::True > if the invocant is a valid path that exists.
58
58
59
59
= head2 method d
60
60
61
- method d(--> Bool)
61
+ method d returns Bool
62
62
63
63
Returns C < Bool::True > if the invocant is a path and the directory exists.
64
64
65
65
= head2 method f
66
66
67
- method f(--> Bool)
67
+ method f returns Bool
68
68
69
69
Returns C < Bool::True > if the invocant is a path and the file exists.
70
70
71
71
= head2 method s
72
72
73
- method s(--> Bool)
73
+ method s returns Bool
74
74
75
75
Returns C < Bool::True > if the invocant is a path and the size is bigger then 0.
76
76
77
77
= head2 method l
78
78
79
- method l(--> Bool)
79
+ method l returns Bool
80
80
81
81
Returns C < Bool::True > if the invocant is a path and a symlink.
82
82
83
83
= head2 method r
84
84
85
- method r(--> Bool)
85
+ method r returns Bool
86
86
87
87
Returns C < Bool::True > if the invocant is a path and accessible.
88
88
89
89
= head2 method w
90
90
91
- method w(--> Bool)
91
+ method w returns Bool
92
92
93
93
Returns C < Bool::True > if the invocant is a path and writable.
94
94
95
95
= head2 method rw
96
96
97
- method rw(--> Bool)
97
+ method rw returns Bool
98
98
99
99
Returns C < Bool::True > if the invocant is a path, read and writable.
100
100
101
101
= head2 method x
102
102
103
- method x(--> Bool)
103
+ method x returns Bool
104
104
105
105
Returns C < Bool::True > if the invocant is a path and executable.
106
106
107
107
= head2 method rwx
108
108
109
- method rwx(--> Bool)
109
+ method rwx returns Bool
110
110
111
111
Returns C < Bool::True > if the invocant is a path, executable, read and writable.
112
112
113
113
= head2 method z
114
114
115
- method z(--> Bool)
115
+ method z returns Bool
116
116
117
117
Returns C < Bool::True > if the invocant is a path and the size is 0.
118
118
@@ -175,7 +175,7 @@ $fn.comb(3, close => True); # Comb file contents by 3 characters and close after
175
175
176
176
= head2 method print
177
177
178
- method print(*@text --> Bool)
178
+ method print(*@text) returns Bool
179
179
180
180
Text writing; writes the given C < @text > to the filehandle. See L < write >
181
181
to write bytes.
@@ -229,13 +229,13 @@ $fh.close;
229
229
230
230
= head2 method read
231
231
232
- method read(IO::Handle:D: Int(Cool:D) $bytes --> Blob)
232
+ method read(IO::Handle:D: Int(Cool:D) $bytes) returns Blob
233
233
234
234
Binary reading; reads and returns up to C < $bytes > bytes from the filehandle.
235
235
236
236
= head2 method readchars
237
237
238
- method readchars(IO::Handle:D: Int(Cool:D) $chars --> Str)
238
+ method readchars(IO::Handle:D: Int(Cool:D) $chars) returns Str
239
239
240
240
Reading chars; reads and returns up to C < $chars > chars (graphemes) from the
241
241
filehandle.
@@ -271,14 +271,14 @@ offset if you want to position before the end of the file.
271
271
272
272
= head2 method tell
273
273
274
- method tell(IO::Handle:D: --> Int)
274
+ method tell(IO::Handle:D:) returns Int
275
275
276
276
Return the current position of the file pointer in bytes.
277
277
278
278
= head2 method slurp-rest
279
279
280
- multi method slurp-rest(IO::Handle:D: :$bin!, :$close --> Buf)
281
- multi method slurp-rest(IO::Handle:D: :$enc, :$close --> Str)
280
+ multi method slurp-rest(IO::Handle:D: :$bin!, :$close) returns Buf
281
+ multi method slurp-rest(IO::Handle:D: :$enc, :$close) returns Str
282
282
283
283
Returns the remaining content of the file from the current file position
284
284
(which may have been set by previous reads or by C < seek > .) If the
@@ -294,7 +294,7 @@ my $rest-of-file = $fh.slurp-rest(:close);
294
294
295
295
= head2 method Supply
296
296
297
- multi method Supply(IO::Handle:D: :$size = 65536, :$bin --> Supply)
297
+ multi method Supply(IO::Handle:D: :$size = 65536, :$bin) returns Supply
298
298
299
299
Returns a C < Supply > that will emit the contents of the handle in chunks.
300
300
The size of the chunks is determined by the optional C < :size > named parameter
@@ -335,13 +335,13 @@ argument such as C<fcntl> or C<ioctl>.
335
335
336
336
= head2 method opened
337
337
338
- method opened(IO::Handle:D: --> Bool)
338
+ method opened(IO::Handle:D:) returns Bool
339
339
340
340
Returns C < True > if the handle is open.
341
341
342
342
= head2 method t
343
343
344
- method t(IO::Handle:D: --> Bool)
344
+ method t(IO::Handle:D:) returns Bool
345
345
346
346
Returns C < True > if the handle is opened to a tty.
347
347
0 commit comments