Why Nostr? What is Njump?
2024-06-21 22:44:27

npub16c…64r9n on Nostr: commit 2b17a5407e0eb614edb62704e214ae13aecec386 Author: randymcmillan ...

commit 2b17a5407e0eb614edb62704e214ae13aecec386
Author: randymcmillan <[email protected]>
Date: Thu May 16 09:24:37 2024 -0400

Cargo.toml:src/main.rs:add include_dir

diff --git a/Cargo.toml b/Cargo.toml
index d4d1799..56695eb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,3 +16,4 @@ authors.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
+include_dir = { version = "0.7.3", features = ["glob", "metadata"] }
diff --git a/src/main.rs b/src/main.rs
index e7a11a9..add5545 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,13 @@
+use std::path::Path;
+use include_dir::{include_dir, Dir};
+static PROJECT_DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR");
fn main() {
- println!("Hello, world!");
+ print_entries();
+}
+//#[cfg(feature = "glob")]
+fn print_entries() -> () {
+ let glob = "**/*.md";
+ for entry in PROJECT_DIR.find(glob).unwrap() {
+ println!("Found {}", entry.path().display());
+ }
}
Author Public Key
npub16c053tzruknqcjuk5p4gwc9e4zeqeu9m4an2695d9tzv5ttvq57sz64r9n