Function expand_home_dir

Source
pub(crate) fn expand_home_dir(
    path: PathBuf,
    home_dir: Option<&Path>,
) -> Option<PathBuf>
Expand description

If the first component of the path is ~, replaces it with the home dir. If no home dir is present, returns None.