write(contentsOf:)

    Write the contents of the AsyncSequence of byte chunks to the buffer.

    BufferedWriter.swift:128
    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    @discardableResult mutating func write<Chunks>(contentsOf chunks: Chunks) async throws -> Int64 where Chunks : AsyncSequence, Chunks.Element : Sequence, Chunks.Element.Element == UInt8

    Parameters

    bytes

    The AsyncSequence of byte chunks to write to the buffer.

    Returns

    The number of bytes written into the buffered writer.

    If appending a chunk to the buffer causes it to exceed the capacity of the buffer then the contents of the buffer are automatically written to the file system.

    To manually flush bytes use flush.

    Other members in extension

    Instance members

    Show system interfaces (1)

    Hide system interfaces