Instance Methodswift-nio 2.72.0_NIOFileSystem->NIOCore
write(toFileAt:absoluteOffset:options:)
Writes the readable bytes of the ByteBuffer
to a file.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
@discardableResult func write(toFileAt path: FilePath, absoluteOffset offset: Int64 = 0, options: OpenOptions.Write = .newFile(replaceExisting: false)) async throws -> Int64
Parameters
Returns
The number of bytes written to the file.
Other members in extension
Type members
init(contentsOf: FilePath, maximumSizeAllowed: ByteCount
) async throws Reads the contents of the file at the path using
FileSystem
.init(contentsOf: FilePath, maximumSizeAllowed: ByteCount, fileSystem: some FileSystemProtocol
) async throws Reads the contents of the file at the path.
Instance members
func write(toFileAt: FilePath, absoluteOffset: Int64, options: OpenOptions.Write, fileSystem: some FileSystemProtocol
) async throws -> Int64 Writes the readable bytes of the
ByteBuffer
to a file.