We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
temp_dir()
1 parent 28b83ee commit 0d4d752Copy full SHA for 0d4d752
library/std/src/env.rs
@@ -668,7 +668,9 @@ pub fn home_dir() -> Option<PathBuf> {
668
/// On Unix, returns the value of the `TMPDIR` environment variable if it is
669
/// set, otherwise the value is OS-specific:
670
/// - On Android, there is no global temporary folder (it is usually allocated
671
-/// per-app), it returns `/data/local/tmp`.
+/// per-app), it will return the application's cache dir if the program runs
672
+/// in application's namespace and system version is Android 13 (or above), or
673
+/// `/data/local/tmp` otherwise.
674
/// - On Darwin-based OSes (macOS, iOS, etc) it returns the directory provided
675
/// by `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)`, as recommended by [Apple's
676
/// security guidelines][appledoc].
0 commit comments