Skip to main content

truncate

Function truncate 

Source
pub fn truncate(path: &str, length: u64) -> Result<(), SyscallError>
Expand description

Truncate a file by path.

Opens the file with WRITE, truncates, and closes. The scheme’s truncate() method is called directly if available; otherwise opens+closes as fallback.