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.
| Platform | Value | Example |
|---|---|---|
| Linux | $TMPDIR or /tmp | /tmp |
| macOS | $TMPDIR | /var/folders/…/T/ |
| Windows | {FOLDERID_LocalAppData}\Temp | C:\Users\Alice\AppData\Local\Temp |
| iOS | sandbox/tmp | <sandbox>/tmp |
| Android | files/tmp (after init) | /data/data/com.example/files/tmp |
| WASM | None |