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

#1656 in Filesystem

Download history 413/week @ 2025-09-23 329/week @ 2025-09-30 86/week @ 2025-10-07 303/week @ 2025-10-14 145/week @ 2025-10-21 281/week @ 2025-10-28 373/week @ 2025-11-04 467/week @ 2025-11-11 597/week @ 2025-11-18 321/week @ 2025-11-25 272/week @ 2025-12-02 1118/week @ 2025-12-09 429/week @ 2025-12-16 248/week @ 2025-12-23 351/week @ 2025-12-30 180/week @ 2026-01-06

1,379 downloads per month
Used in 4 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.8–6MB
~139K SLoC