basic_folder/
basic_folder.rs1use include_crypt::{include_dir, EncryptedFolder};
2
3static FOLDER: EncryptedFolder = include_dir!("examples");
4
5fn main() {
6 for (name, _) in FOLDER.files {
7 println!("file_name: {:?}", name);
8 }
9
10 println!(
11 "found 'examples/basic_folder': {:?}",
12 FOLDER.get("examples/basic_folder").is_some()
13 );
14 println!(
15 "content of 'examples/example.data': {}",
16 FOLDER
17 .get("example.data")
18 .map(|file| file.decrypt_str().expect("Failed to decrypt content"))
19 .expect("Failed to find file")
20 )
21}