wasi

Function fd_filestat_set_size

Source
pub unsafe fn fd_filestat_set_size(fd: Fd, size: Filesize) -> Result<(), Errno>
Expand description

Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros. Note: This is similar to ftruncate in POSIX.

§Parameters

  • size - The desired file size.