Expand description
Structsยง
- WithDir
- Scoped modifier of the current working directory. This uses RAII to set the
current working directory back to what it was when the instance is dropped.
This struct uses a static
parking_lot::ReentrantMutex
to preventWithDir
on other threads from updating the current working directory while any WithDir instances exist. However there is nothing stopping other threads from callingstd::env::set_current_dir
directly which would override the working directory.