Instance Method
writeFile(_:at:)
Write the contents of buffer to a file at the supplied path.
func writeFile(_ buffer: ByteBuffer, at path: String) async throws
Parameters
bufferThe
ByteBufferto write.pathPath to file on the disk.
Discussion
let data = ByteBuffer(string: "ByteBuffer")
try await req.fileio.writeFile(data, at: "/path/to/file.txt")
Warning
This method will overwrite the file if it already exists.