You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: library/std/src/env.rs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -597,6 +597,13 @@ impl Error for JoinPathsError {
597
597
598
598
/// Returns the path of the current user's home directory if known.
599
599
///
600
+
/// This may return `None` if getting the directory fails or if the platform does not have user home directories.
601
+
///
602
+
/// For storing user data and configuration it is often preferable to use more specific directories.
603
+
/// For example, [XDG Base Directories] on Unix or the `LOCALAPPDATA` and `APPDATA` environment variables on Windows.
604
+
///
605
+
/// [XDG Base Directories]: https://specifications.freedesktop.org/basedir-spec/latest/
606
+
///
600
607
/// # Unix
601
608
///
602
609
/// - Returns the value of the 'HOME' environment variable if it is set
0 commit comments