We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CloseFile
1 parent 04553a0 commit 18a11bcCopy full SHA for 18a11bc
src/vfs/file.rs
@@ -20,12 +20,6 @@ impl File {
20
}
21
22
23
- fn drop(&self) {
24
- vfs_request(&self.path, VfsAction::CloseFile)
25
- .send()
26
- .unwrap();
27
- }
28
-
29
/// Reads the entire file, from start position.
30
/// Returns a vector of bytes.
31
pub fn read(&self) -> Result<Vec<u8>, VfsError> {
@@ -329,6 +323,14 @@ impl File {
329
323
330
324
331
325
326
+impl Drop for File {
327
+ fn drop(&mut self) {
328
+ vfs_request(&self.path, VfsAction::CloseFile)
+ .send()
+ .unwrap();
+ }
332
+}
333
+
334
/// Creates a drive with path "/package_id/drive", gives you read and write caps.
335
/// Will only work on the same package_id as you're calling it from, unless you
336
/// have root capabilities.
0 commit comments