Skip to content

Commit

Permalink
vfs file: drop -> close file
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Oct 1, 2024
1 parent 809c3a5 commit 04553a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vfs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ impl File {
}
}

fn drop(&self) {
vfs_request(&self.path, VfsAction::CloseFile)
.send()
.unwrap();
}

/// Reads the entire file, from start position.
/// Returns a vector of bytes.
pub fn read(&self) -> Result<Vec<u8>, VfsError> {
Expand Down

0 comments on commit 04553a0

Please sign in to comment.