pub fn chroot<P: AsRef<Path>>(dir: P) -> Result<()>Available on non-Hermit and (Unix) and not ((WebAssembly and non-WASI, or Fortanix and SGX)) and non-Fuchsia only.
Expand description
Change the root directory of the current process to the specified path.
This typically requires privileges, such as root or a specific capability.
This does not change the current working directory; you should call
std::env::set_current_dir afterwards.