Instance Propertyswift-nio 2.81.0_NIOFileSystem
bufferedBytes
The number of bytes in the buffer.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
var bufferedBytes: Int { get }
You can flush the buffer manually by calling flush
.
The number of bytes in the buffer.
var bufferedBytes: Int { get }
You can flush the buffer manually by calling flush
.
import _NIOFileSystem
A file system library for Swift.
struct BufferedWriter<Handle> where Handle : WritableFileHandleProtocol
A writer which buffers bytes in memory before writing them to the file system.
@frozen struct Int
A signed integer value type.
mutating func flush() async throws
Flush any buffered bytes to the file system.
var bufferCapacity: Int { get }
The capacity of the buffer.
let capacity: Int
The maximum number of bytes to buffer before the buffer is automatically flushed.
@discardableResult mutating func write(contentsOf bytes: ByteBuffer) async throws -> Int64
Write the contents of the ByteBuffer
into the buffer.
@discardableResult mutating func write(contentsOf bytes: some Sequence<UInt8>) async throws -> Int64
Write the contents of the collection of bytes to the buffer.
@discardableResult mutating func write<Chunks>(contentsOf chunks: Chunks) async throws -> Int64 where Chunks : AsyncSequence, Chunks.Element == ByteBuffer
Write the contents of the AsyncSequence
of ByteBuffer
s into the buffer.
@discardableResult mutating func write<Chunks>(contentsOf chunks: Chunks) async throws -> Int64 where Chunks : AsyncSequence, Chunks.Element : Sequence, Chunks.Element.Element == UInt8
Write the contents of the AsyncSequence
of byte chunks to the buffer.
@discardableResult mutating func write<Bytes>(contentsOf bytes: Bytes) async throws -> Int64 where Bytes : AsyncSequence, Bytes.Element == UInt8
Write the contents of the AsyncSequence
of bytes the buffer.