summaryrefslogtreecommitdiff
path: root/v1/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'v1/src/main.rs')
-rw-r--r--v1/src/main.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/v1/src/main.rs b/v1/src/main.rs
new file mode 100644
index 0000000..d78da04
--- /dev/null
+++ b/v1/src/main.rs
@@ -0,0 +1,33 @@
+extern crate fuse;
+extern crate libc;
+
+use fuse::{Filesystem, Request, ReplyEntry, ReplyAttr, ReplyDirectory, ReplyData};
+use libc::ENOENT;
+use std::ffi::OsStr;
+
+struct MemFs;
+
+impl Filesystem for MemFs {
+ fn lookup(&mut self, _req: &Request, _parent: u64, _name: &OsStr,
+ reply: ReplyEntry) {
+ reply.error(ENOENT);
+ }
+
+ fn getattr(&mut self, _req: &Request, _ino: u64, reply: ReplyAttr) {
+ reply.error(ENOENT);
+ }
+
+ fn read(&mut self, _req: &Request, _ino: u64, _fh: u64, _offset: u64,
+ _size: u32, reply: ReplyData) {
+ reply.error(ENOENT);
+ }
+ fn readdir (&mut self, _req: &Request, ino: u64, _fh: u64, offset: u64,
+ reply: ReplyDirectory) {
+ reply.error(ENOENT);
+ }
+}
+
+fn main() {
+ let mountpoint = std::env::args_os().nth(1).unwrap();
+ fuse::mount(MemFs, &mountpoint, &[]).unwrap();
+}