litcheck_core/fs/
mod.rs

1mod filesearch;
2mod glob;
3mod path_tree;
4
5pub use self::filesearch::*;
6pub use self::glob::*;
7pub use self::path_tree::PathPrefixTree;
8
9use std::{borrow::Cow, path::Path};
10
11/// Returns an empty placeholder path value for use with [serde::Deserialize]
12#[inline]
13pub fn empty_path() -> Cow<'static, Path> {
14    Cow::Borrowed(Path::new(""))
15}
16
17/// Returns a sane default value for the `source_dir` field of [TestSuite]
18#[inline]
19pub fn default_source_dir() -> &'static Path {
20    Path::new(".")
21}
22
23/// Returns a new temporary directory that can be used for transient artifacts
24#[inline]
25pub fn default_temp_dir() -> Box<Path> {
26    std::env::temp_dir().into_boxed_path()
27}