transferTo

Transfers elements from an input stream to an output stream, doing so continuously until the input stream reads 0 elements or an error occurs. The streams are not closed after transfer completes.

transferTo
(
I
O
E = StreamType!I
uint BufferSize = 4096
)
(
ref I input
,
ref O output
,
Optional!ulong maxElements = Optional!ulong.init
)
if (
isInputStream!(I, E) &&
)

Parameters

input I

The input stream to read from.

output O

The output stream to write to.

maxElements Optional!ulong

The maximum number of elements to transfer. Defaults to an empty optional, meaning unlimited elements.

Return Value

The result of the transfer operation.

Meta