4 releases (2 breaking)

0.2.0 Jul 31, 2021
0.1.0 Jul 3, 2021
0.0.1 Jul 3, 2021
0.0.0 Jan 1, 2020

#4 in #trees

Download history 143/week @ 2024-07-03 207/week @ 2024-07-10 149/week @ 2024-07-17 118/week @ 2024-07-24 528/week @ 2024-07-31 107/week @ 2024-08-07 86/week @ 2024-08-14 442/week @ 2024-08-21 338/week @ 2024-08-28 147/week @ 2024-09-04 269/week @ 2024-09-11 146/week @ 2024-09-18 241/week @ 2024-09-25 136/week @ 2024-10-02 107/week @ 2024-10-09 67/week @ 2024-10-16

582 downloads per month
Used in 2 crates

CC0 license

7KB
111 lines

temptree: temporary trees of files


lib.rs:

Temptree creates temporary trees of files:

use temptree::temptree;

let tree = temptree! {
  foo: "a",
  bar: {
    baz: "b",
  },
};

let foo_contents = std::fs::read_to_string(tree.path().join("foo")).unwrap();
assert_eq!(foo_contents, "a");

let baz_contents = std::fs::read_to_string(tree.path().join("bar/baz")).unwrap();
assert_eq!(baz_contents, "b");

Dependencies

~1.6–9.5MB
~113K SLoC