:sig
function file_seek(handle : u64, offset : s64, whence : s64) s64

:params
handle : handle from `file_open`
offset : byte offset
whence : `0` for the start, `1` for the current position, or `2` for the end

:returns
The new byte offset. Returns `-1` on error.

:content
`file_seek` sets the position for file reads and writes.

:example capy render
var handle := file_open("/tmp/doc-seek.txt", "w")
file_write(handle, "hello world")
file_close(handle)
handle = file_open("/tmp/doc-seek.txt", "r")
file_seek(handle, s64(6), s64(0))
print(file_read(handle, u64(5)), "\n")
file_close(handle)

:see-group
file-handles
