diff --git a/cap-tempfile/src/lib.rs b/cap-tempfile/src/lib.rs index d902142d..2e381e39 100644 --- a/cap-tempfile/src/lib.rs +++ b/cap-tempfile/src/lib.rs @@ -101,6 +101,16 @@ impl TempDir { Err(Self::already_exists()) } + /// Make this directory persistent. + /// + /// This corresponds to [`tempfile::TempDir::into_path`], but returns a [`Dir`]. + /// + /// [`tempfile::TempDir::into_path`]: https://docs.rs/tempfile/latest/tempfile/struct.TempDir.html#method.into_path + /// [`Dir`]: https://docs.rs/cap-std/latest/cap_std/fs/struct.Dir.html + pub fn into_dir(mut self) -> io::Result