summaryrefslogtreecommitdiff
path: root/Doc/lib/libposixpath.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libposixpath.tex')
-rw-r--r--Doc/lib/libposixpath.tex17
1 files changed, 11 insertions, 6 deletions
diff --git a/Doc/lib/libposixpath.tex b/Doc/lib/libposixpath.tex
index 1dbe32ff17..3687c6d7b9 100644
--- a/Doc/lib/libposixpath.tex
+++ b/Doc/lib/libposixpath.tex
@@ -58,18 +58,20 @@ Equivalent to \function{exists()} on platforms lacking
\end{funcdesc}
\begin{funcdesc}{expanduser}{path}
-On \UNIX, return the argument with an initial component of \samp{\~} or
-\samp{\~\var{user}} replaced by that \var{user}'s home directory.
-An initial \samp{\~} is replaced by the environment variable
+On \UNIX and Windows, return the argument with an initial component of
+\samp{\~} or \samp{\~\var{user}} replaced by that \var{user}'s home directory.
+
+On \UNIX, an initial \samp{\~} is replaced by the environment variable
\envvar{HOME} if it is set; otherwise the current user's home directory
is looked up in the password directory through the built-in module
\refmodule{pwd}\refbimodindex{pwd}.
An initial \samp{\~\var{user}} is looked up directly in the
password directory.
-On Windows, only \samp{\~} is supported; it is replaced by the
-environment variable \envvar{HOME} or by a combination of
-\envvar{HOMEDRIVE} and \envvar{HOMEPATH}.
+On Windows, \envvar{HOME} and \envvar{USERPROFILE} will be used if set,
+otherwise a combination of \envvar{HOMEPATH} and \envvar{HOMEDRIVE} will be
+used. An initial \samp{\~\var{user}} is handled by stripping the last
+directory component from the created user path derived above.
If the expansion fails or if the
path does not begin with a tilde, the path is returned unchanged.
@@ -81,6 +83,9 @@ of the form \samp{\$\var{name}} or \samp{\$\{\var{name}\}} are
replaced by the value of environment variable \var{name}. Malformed
variable names and references to non-existing variables are left
unchanged.
+
+On Windows, \samp{\%\var{name}\%} expansions are supported in addition to
+\samp{\$\var{name}} and \samp{\$\{\var{name}\}}.
\end{funcdesc}
\begin{funcdesc}{getatime}{path}