fn truncate(&self, offs: u64) -> io::Result<()> {
		let fd = self.file.as_raw_fd();
		let res = unsafe { ftruncate64(fd, offs as off64_t) };
		if res == -1 {
			Err(io::Error::last_os_error())
		} else {
			Ok(())
		}
	}
/// Truncates the underlying file to the provided offset
Truncates the underlying file to the provided offset
Truncates the underlying file to the provided offset
fn truncate(&self, offs: u64) -> io::Result<()> {
		let fd = self.file.as_raw_fd();
		let res = unsafe { ftruncate64(fd, offs as off64_t) };
		if res == -1 {
			Err(io::Error::last_os_error())
		} else {
			Ok(())
		}
	}
fn truncate ( & self , offs : u64 ) -> io :: Result < ( ) > { let fd = self . file . as_raw_fd ( ) ; let res = unsafe { ftruncate64 ( fd , offs as off64_t ) } ; if res == - 1 { Err ( io :: Error :: last_os_error ( ) ) } else { Ok ( ( ) ) } }
Truncates the underlying file to the provided offset
Truncates the underlying file to the provided offset
&self
offs
u64