Closes the file.
impl File {
fn close(&mut self) -> Result<(), Errno>
}If the file is not owned, an error is returned. If the file is owned and the kernel returns an error, the error is returned but the file descriptor contained in this object is nonetheless replaced by -1.