Built-in Module riscos

riscos

This module provides RiscOS ports of some POSIX funtions, and some RiscOS specific functions.

Errors are reported as exceptions; the usual exceptions are given for type errors, while errors reported by the system calls raise riscos.error, described below.


\begin{excdesc}{error}
This exception is raised when an RiscOS function returns ...
...ing describing the error, often that returned by the relevant SWI.
\end{excdesc}

It defines the following functions:


\begin{funcdesc}{chdir}{path}
Change the current working directory to \var{path}.
\end{funcdesc}


\begin{funcdesc}{chmod}{path\, mode}
Change the mode of \var{path} to the numeric \var{mode}.
\end{funcdesc}


\begin{funcdesc}{expand}{path}
Returns the canonical expansion of a pathname.
\end{funcdesc}


\begin{funcdesc}{getcwd}{}
Return a string representing the current directory.
\end{funcdesc}


\begin{funcdesc}{getenv}{string}
Returns the string value of the environment variable \var{string}
or \code{None} if it does not exist.
\end{funcdesc}


\begin{funcdesc}{listdir}{path}
Return a list containing the names of the entries in the directory.
The list is in arbitrary order.
\end{funcdesc}


\begin{funcdesc}{mkdir}{path \optional{\, mode}}
Create a directory named \var{path}, at present \var{mode} is ignored.
\end{funcdesc}


\begin{funcdesc}{putenv}{name\, string \optional{\, type}}
Sets the environment ...
...ii}\var{type} defaults to 4 (no translation of the value string).
\end{funcdesc}


\begin{funcdesc}{remove}{path}
Remove the directory or file \var{path}.
\end{funcdesc}


\begin{funcdesc}{rename}{src\, dst}
Rename the file or directory \var{src} to \var{dst}.
\end{funcdesc}


\begin{funcdesc}{rmdir}{path}
Remove the directory or file \var{path} (Same as remove).
\end{funcdesc}


\begin{funcdesc}{settype}{filename\, type}
Sets the type of \var{filename}. \var{type} can be an integer or a string.
\end{funcdesc}


\begin{funcdesc}{stat}{path}
Perform a {\em stat} system call on the given path....
...that are useful for extracting information from a stat structure.
\end{funcdesc}


\begin{funcdesc}{system}{command}
Execute the command (a string). This is implem...
... status of the process as returned by Standard C
\code{system()}.
\end{funcdesc}


\begin{funcdesc}{unlink}{path}
Unlink \var{path} (Same as remove).
\end{funcdesc}


\begin{funcdesc}{utime}{path\, \(atime\, mtime\)}
Set the time stamp of the file...
...cond argument
is ignored and the time is set to the current time.
\end{funcdesc}