Skip to main content

under_temp_root

Function under_temp_root 

Source
pub fn under_temp_root(path: &str) -> bool
Expand description

Whether path is under a temporary-filesystem root. /tmp and /var/tmp count on every platform. On macOS, so do /private/tmp, /private/var/tmp, and /var/folders/<segment>/<segment>/T with its /private spelling. $TMPDIR counts too.

The match is exact, including case. Scratchpad recognition uses this and not under_temp: folding /TMP into the scratchpad on a case-sensitive volume would treat a different directory as this session’s.