summaryrefslogtreecommitdiff
path: root/ayafs/src/memory/file_handle.rs
diff options
context:
space:
mode:
authorChuyan Zhang <me@zcy.moe>2023-11-30 12:01:11 -0800
committerChuyan Zhang <me@zcy.moe>2023-11-30 12:01:11 -0800
commitfd125947c9db0b33761414e65e919f73d9bf1815 (patch)
treec4c66d95ba85601427928aa7f23659590055d464 /ayafs/src/memory/file_handle.rs
parent1eac97eea4ec0bcef0be061a2cba93a584355283 (diff)
downloadmyfs-fd125947c9db0b33761414e65e919f73d9bf1815.tar.gz
myfs-fd125947c9db0b33761414e65e919f73d9bf1815.zip
Refactor workspace
Diffstat (limited to 'ayafs/src/memory/file_handle.rs')
-rw-r--r--ayafs/src/memory/file_handle.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/ayafs/src/memory/file_handle.rs b/ayafs/src/memory/file_handle.rs
deleted file mode 100644
index c821619..0000000
--- a/ayafs/src/memory/file_handle.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-use crate::AyaFS;
-use std::sync::atomic::Ordering;
-
-impl AyaFS {
- pub(crate) fn allocate_file_descriptor(
- &mut self,
- inode_index: usize,
- read: bool,
- write: bool,
- ) -> u64 {
- let fd = self.next_file_handle.fetch_add(1, Ordering::SeqCst);
- self.file_handle_map.insert(fd, (inode_index, read, write));
- fd
- }
-}