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

#26 in #temporary

Download history 89/week @ 2024-07-22 555/week @ 2024-07-29 98/week @ 2024-08-05 91/week @ 2024-08-12 265/week @ 2024-08-19 464/week @ 2024-08-26 184/week @ 2024-09-02 149/week @ 2024-09-09 254/week @ 2024-09-16 189/week @ 2024-09-23 203/week @ 2024-09-30 121/week @ 2024-10-07 82/week @ 2024-10-14 134/week @ 2024-10-21 133/week @ 2024-10-28 108/week @ 2024-11-04

464 downloads per month
Used in 2 crates

CC0 license

7KB
140 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
~112K SLoC