Skip to content

Commit

Permalink
Some rewriting, reformatting and reflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Sep 23, 2018
1 parent a7aed3e commit 7c0bd57
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions doc/Type/IO/Handle.pod6
Expand Up @@ -641,6 +641,9 @@ Defined as:
Writes C<$buf> to the filehandle. This method can be called even when the
handle is not L<in binary mode|/type/IO::Handle#method_encoding>.
X<|SeekFromBeginning>
X<|SeekFromCurrent>
X<|SeekFromEnd>
=head2 method seek
Defined as:
Expand All @@ -652,18 +655,12 @@ or write operations will begin) to the byte position specified by
C<$offset> relative to the location specified by C<$whence> which may be
one of:
=item SeekFromBeginning
=item C<SeekFromBeginning>: The beginning of the file.
The beginning of the file.
=item C<SeekFromCurrent>: The current position in the file.
=item SeekFromCurrent
The current position in the file.
=item SeekFromEnd
The end of the file. Please note that you need to specify a negative
offset if you want to position before the end of the file.
=item C<SeekFromEnd>: The end of the file. Please note that you need to specify
a negative offset if you want to position before the end of the file.
=head2 method tell
Expand All @@ -684,27 +681,26 @@ B<DEPRECATION NOTICE:> this method will be deprecated in C<6.d> language. Do
not use it for new code. Use L«C<.slurp> method|/routine/slurp» method
instead.
Return the remaining content of the file from the current file position
(which may have been set by previous reads or by C<seek>.) If the
adverb C<:bin> is provided a L<Buf> will be returned,
otherwise the return will be a C<Str> with the optional encoding C<:enc>.
Return the remaining content of the file from the current file position (which
may have been set by previous reads or by C<seek>.) If the adverb C<:bin> is
provided a L<Buf> will be returned; otherwise the return will be a C<Str> with
the optional encoding C<:enc>.
=head2 method slurp
Defined as:
method slurp(IO::Handle:D: :$close, :$bin)
Returns all the content from the current file position to the end.
If the invocant is in binary mode or if C<$bin> is set to C<True>,
will return a L<Buf>, otherwise will decode
the content using invocant's current L«C<.encoding>|/routine/encoding» and
return a L<Str>.
Returns all the content from the current file pointer to the end. If the
invocant is in binary mode or if C<$bin> is set to C<True>, will return a
L<Buf>, otherwise will decode the content using invocant's current
L«C<.encoding>|/routine/encoding» and return a L<Str>.
If C<:$close> is set to C<True>, will close the handle when finished reading.
B<Note:> On L<Rakudo|/language/glossary#Rakudo> this method was introduced
with release 2017.04 and C<$bin> arg was added in 2017.10.
with release 2017.04; C<$bin> arg was added in 2017.10.
=head2 method Supply
Expand All @@ -714,7 +710,8 @@ Defined as:
Returns a C<Supply> that will emit the contents of the handle in chunks.
The chunks will be L«C<Buf>|/type/Buf» if the handle is in binary mode
or, if it isn't, L«C<Str>|/type/Str» decoded using same encoding as L«C<IO::Handle.encoding>|/routine/encoding».
or, if it isn't, L«C<Str>|/type/Str» decoded using same encoding as
L«C<IO::Handle.encoding>|/routine/encoding».
The size of the chunks is determined by the optional C<:size> named
parameter and C<65536> bytes in binary mode or C<65536> characters in non-binary
Expand Down

0 comments on commit 7c0bd57

Please sign in to comment.