diff --git a/json_adder/examples/insert_many.rs b/json_adder/examples/insert_many.rs new file mode 100644 index 0000000..35803f3 --- /dev/null +++ b/json_adder/examples/insert_many.rs @@ -0,0 +1,10 @@ +// Example from https://www.mongodb.com/docs/drivers/rust/current/usage-examples/insertMany/ + +use std::fs; + +// Loop over files in a directory, in this case I've created /data +fn main() { + for file in fs::read_dir("../../api.freifunk.net/data/history/").unwrap() { + println!("{}", file.unwrap().path().display()); + } +} \ No newline at end of file