diff options
Diffstat (limited to 'test_util/src/fs.rs')
-rw-r--r-- | test_util/src/fs.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test_util/src/fs.rs b/test_util/src/fs.rs index f9443c9c5..2a64fb9c4 100644 --- a/test_util/src/fs.rs +++ b/test_util/src/fs.rs @@ -324,6 +324,10 @@ impl TempDir { Self::new_inner(&std::env::temp_dir(), Some(prefix)) } + pub fn new_in(parent_dir: &Path) -> Self { + Self::new_inner(parent_dir, None) + } + pub fn new_with_path(path: &Path) -> Self { Self(Arc::new(TempDirInner::Path(PathRef(path.to_path_buf())))) } |