diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-11 00:36:28 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-11 00:36:28 -0400 |
commit | 35f5d3c514b640d3b99c643890bb4a655025994d (patch) | |
tree | e69e85f607cc5ca64f07d2ac28ee6a2f7ca5c794 | |
parent | 736e822f747e86f3d1bea54b8b83f5a8f0a21da8 (diff) |
Add an extra library file with some junk.
-rw-r--r-- | v1/src/data.rs | 13 | ||||
-rw-r--r-- | v1/src/lib.rs | 1 | ||||
-rw-r--r-- | v1/src/main.rs | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/v1/src/data.rs b/v1/src/data.rs new file mode 100644 index 0000000..4b1da5a --- /dev/null +++ b/v1/src/data.rs @@ -0,0 +1,13 @@ +pub static MESSAGE: &'static str = "Hello"; + +pub enum SimpleFsData { + File(String, String), + Directory(String, Vec<SimpleFsData>) +} + +// pub static HELLO: &'static SimpleFsData = +// SimpleFsData:File("hello.txt", "Hello World"); + +pub fn getData1() -> SimpleFsData { + SimpleFsData::File("hello.txt".to_string(), "Hello".to_string()) +} diff --git a/v1/src/lib.rs b/v1/src/lib.rs new file mode 100644 index 0000000..7a345e4 --- /dev/null +++ b/v1/src/lib.rs @@ -0,0 +1 @@ +pub mod data; diff --git a/v1/src/main.rs b/v1/src/main.rs index d78da04..29196b0 100644 --- a/v1/src/main.rs +++ b/v1/src/main.rs @@ -1,6 +1,8 @@ extern crate fuse; extern crate libc; +extern crate v1; +use v1::data::MESSAGE; use fuse::{Filesystem, Request, ReplyEntry, ReplyAttr, ReplyDirectory, ReplyData}; use libc::ENOENT; use std::ffi::OsStr; @@ -28,6 +30,7 @@ impl Filesystem for MemFs { } fn main() { + println!("{}", MESSAGE); let mountpoint = std::env::args_os().nth(1).unwrap(); fuse::mount(MemFs, &mountpoint, &[]).unwrap(); } |