Files
swift-nio/Sources/NIOFileSystem/Docs.docc/Extensions/WritableFileHandleProtocol.md
T
George Barnett d8bf55d693 Add a version of 'write' for 'ByteBuffer' (#2730)
* Add a version of 'write' for 'ByteBuffer'

Motivation:

At the moment 'WritableFileHandleProtocol' is in terms of
`some Sequence<UInt8>`. To use a `ByteBuffer` users must pass in the
readable view of the buffer, which is inconvenient.

Modifications:

- Add an extension to `WritableFileHandleProtocol` which takes a
  `ByteBuffer`.

Result:

Easier to use API

* fix docs
2024-05-29 14:59:06 +01:00

13 lines
277 B
Markdown

# ``_NIOFileSystem/WritableFileHandleProtocol``
## Topics
### Write bytes to a file
- ``write(contentsOf:toAbsoluteOffset:)-57fnc``
- ``write(contentsOf:toAbsoluteOffset:)-4na03``
- ``bufferedWriter(startingAtAbsoluteOffset:capacity:)``
### Resize a file
- ``resize(to:)``