Rollup merge of #133880 - ChrisDenton:homedir, r=Mark-Simulacrum

Expand home_dir docs

Since `home_dir` is set to be undeprecated, let's make the docs a bit more thorough.
This commit is contained in:
Matthias Krüger
2024-12-09 01:56:33 +01:00
committed by GitHub
+7
View File
@@ -597,6 +597,13 @@ fn description(&self) -> &str {
/// Returns the path of the current user's home directory if known.
///
/// This may return `None` if getting the directory fails or if the platform does not have user home directories.
///
/// For storing user data and configuration it is often preferable to use more specific directories.
/// For example, [XDG Base Directories] on Unix or the `LOCALAPPDATA` and `APPDATA` environment variables on Windows.
///
/// [XDG Base Directories]: https://specifications.freedesktop.org/basedir-spec/latest/
///
/// # Unix
///
/// - Returns the value of the 'HOME' environment variable if it is set