include_dir_bytes 0.2.1

Read the directory recursively, and creates a `HashMap` with these contents at compile time with the file path as the key.
1
2
3
4
5
6
7
8
#![feature(plugin)]
#![plugin(include_dir_bytes)]

#[test] fn include_dir_test() {
    let file_map = include_dir!("");
    let content: String = String::from_utf8(file_map.get(std::path::Path::new("dir/a.txt")).unwrap().to_vec()).unwrap();
    assert_eq!(content, "hoge\n");
}