File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ and the stream may be buffered.
29
29
30
30
= head2 method eof
31
31
32
- Returns L < Bool:: True> if the read operations have exhausted the content of the file.
32
+ Returns C < True > if the read operations have exhausted the content of the file.
33
33
34
34
= head2 method lines
35
35
@@ -82,6 +82,19 @@ to write bytes.
82
82
$fh.print("some text\n");
83
83
$fh.close;
84
84
85
+ = head2 method print-nl
86
+
87
+ method print-nl(IO::Handle:D: --> True)
88
+
89
+ Writes a newline to the filehandle. The newline marker defaults
90
+ to C < \n > unless another marker has been specified in the call to
91
+ L < open > .
92
+
93
+ my $fh = open 'path/to/file', :w, nl-out => "\r\n";
94
+ $fh.print("some text");
95
+ $fh.print-nl; # \r\n
96
+ $fh.close;
97
+
85
98
= head2 method read
86
99
87
100
method read(IO::Handle:D: Int(Cool:D) $bytes --> Blob)
@@ -182,13 +195,13 @@ argument such as C<fcntl> or C<ioctl>.
182
195
183
196
method opened(IO::Handle:D: --> Bool)
184
197
185
- Returns L < Bool:: True> if the handle is open.
198
+ Returns C < True > if the handle is open.
186
199
187
200
= head2 method t
188
201
189
202
method t(IO::Handle:D: --> Bool)
190
203
191
- Returns L < Bool:: True> if the handle is opened to a tty.
204
+ Returns C < True > if the handle is opened to a tty.
192
205
193
206
= head1 Related roles and classes
194
207
You can’t perform that action at this time.
0 commit comments