dirs

Function runtime_dir

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

Returns the path to the user’s runtime directory.

The runtime directory contains transient, non-essential data (like sockets or named pipes) that is expected to be cleared when the user’s session ends.

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$XDG_RUNTIME_DIR/run/user/1001/
macOS
Windows