Function tempfile::env::override_temp_dir
source · pub fn override_temp_dir(path: &Path) -> Result<(), PathBuf>
Expand description
Override the default temporary directory (defaults to std::env::temp_dir
). This function
changes the global default temporary directory for the entire program and should not be called
except in exceptional cases where it’s not configured correctly by the platform.
Only the first call to this function will succeed. All further calls will fail with Err(path)
where path
is previously set default temporary directory override.
NOTE: This function does not check if the specified directory exists and/or is writable.