method
File.write
File.write(file: f, buffer: b, count: n) -> int
Writes count bytes of buffer (a string or a bytes allocation) to the handle and returns how many were written.
Example
# doc-check: skip — illustrative let line = "best_floor=3\n" File.write(file: f, buffer: line, count: len(line))