:sig
function file_truncate(path : string, size : u64) bool

:params
path : file path
size : new file length in bytes

:returns
`true` if Capy changes the file length. Otherwise, `false`.

:content
`file_truncate` sets a file length. A smaller length removes trailing bytes.

:example capy render
file_put_contents("/tmp/doc-truncate.txt", "hello world")
if file_truncate("/tmp/doc-truncate.txt", u64(5)) {
    print(file_get_contents("/tmp/doc-truncate.txt"), "\n")
}

:see-group
files
