From 35f5d3c514b640d3b99c643890bb4a655025994d Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 11 May 2017 00:36:28 -0400 Subject: Add an extra library file with some junk. --- v1/src/data.rs | 13 +++++++++++++ v1/src/lib.rs | 1 + v1/src/main.rs | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 v1/src/data.rs create mode 100644 v1/src/lib.rs 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) +} + +// 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(); } -- cgit v1.2.3