Thanks to visit codestin.com
Credit goes to docs.rs

Skip to main content

temp_dir

Function temp_dir 

Source
pub fn temp_dir() -> Option<PathBuf>
Expand description

Returns the path to the app’s temporary directory.

This is a sysdirs extension not present in the dirs crate.

The returned value depends on the operating system and is either a Some, containing a value from the following table, or a None.

PlatformValueExample
Linux$TMPDIR or /tmp/tmp
macOS$TMPDIR/var/folders/…/T/
Windows{FOLDERID_LocalAppData}\TempC:\Users\Alice\AppData\Local\Temp
iOSsandbox/tmp<sandbox>/tmp
Androidfiles/tmp (after init)/data/data/com.example/files/tmp
WASMNone