Skip to content

Commit e7c25b1

Browse files
committed
Document IO::Handle.slurp-rest
1 parent 63fb6eb commit e7c25b1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Type/IO/Handle.pod

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ Return the current position of the file pointer in bytes.
9494
9595
=head2 method slurp-rest
9696
97+
multi method slurp-rest(IO::Handle:D: :$bin! --> Buf)
98+
multi method slurp-rest(IO::Handle:D: :$enc --> Str)
99+
100+
Return the remaining content of the file from the current file position
101+
(which may have been set by previous reads or by C<seek>.) If the
102+
adverb C<:bin> is provided a L<Buf|/lib/Type/Buf> will be returned,
103+
otherwise the return will be a C<Str> with the optional encoding C<:enc>.
104+
97105
=head2 method close
98106
99107
Will close a previously opened filehandle.

0 commit comments

Comments
 (0)