Standard Module riscospath

riscospath

This module implements some useful functions on RiscOS pathnames.

Do not import this module directly. Instead, import the module os and use os.path. os


\begin{funcdesc}{basename}{p}
Return the base name of pathname
\var{p}.
This is ...
...nd half of the pair returned by
\code{riscospath.split(\var{p})}.
\end{funcdesc}


\begin{funcdesc}{commonprefix}{list}
Return the longest string that is a prefix ...
...st}.
If
\var{list}
is empty, return the empty string (\code{''}).
\end{funcdesc}


\begin{funcdesc}{exists}{p}
Return true if
\var{p}
refers to an existing path.
\end{funcdesc}


\begin{funcdesc}{expandvars}{p}
Return the argument with environment variables e...
...ames and references to non-existing variables are left
unchanged.
\end{funcdesc}


\begin{funcdesc}{isabs}{p}
Return true if \var{p} is an absolute pathname (has a dollar).
\end{funcdesc}


\begin{funcdesc}{isfile}{p}
Return true if \var{p} is an existing file. This includes image files.
\end{funcdesc}


\begin{funcdesc}{isdir}{p}
Return true if \var{p} is an existing directory. This includes image files.
\end{funcdesc}


\begin{funcdesc}{islink}{p}
Always returns false.
\end{funcdesc}


\begin{funcdesc}{join}{p\, q}
Join the paths
\var{p}
and
\var{q} intelligently:
...
...(\code{'.'}) inserted unless
\var{p}
is empty or ends in a slash.
\end{funcdesc}


\begin{funcdesc}{normcase}{p}
Normalize the case of a pathname. This converts upper case to
lower case.
\end{funcdesc}


\begin{funcdesc}{split}{p}
Split the pathname \var{p} in a pair \code{(\var{head...
...ly all cases, \code{join(\var{head}, \var{tail})}
equals \var{p}.
\end{funcdesc}


\begin{funcdesc}{splitext}{p}
Split the pathname \var{p} in a pair \code{(\var{r...
...tains no slashess,
and \var{ext} is empty or begins with a slash.
\end{funcdesc}


\begin{funcdesc}{walk}{p\, visit\, arg}
Calls the function \var{visit} with argu...
...must be modified in place, using \code{del} or slice
assignment.)
\end{funcdesc}