Skip to content
FutureBlitz

    Install

    Import std.io.streams

    Copy

    std.io.streams

    function

    Public Function Copy(from: Reader, to: Writer): Int64 Throws IOError

    Copies what's left of from to to, and gives how many bytes that was.

    Examples

    Local from = MemoryStream("copied whole".Bytes)
    Local to = MemoryStream()
    Expect((Try Copy(from, to)) == 12)
    Expect(String.FromUtf8(to.ToArray()) == "copied whole")

    std/io/streams.fb, line 124

    Report an issue with this page or with FutureBlitz on GitHub.