\section{LS List Files Function}

\subsection{Usage}

Lists the files in a directory or directories.  The general syntax for its use is
\begin{verbatim}
  ls('dirname1','dirname2',...,'dirnameN')
\end{verbatim}
but this can also be expressed as
\begin{verbatim}
  ls 'dirname1' 'dirname2' ... 'dirnameN'
\end{verbatim}
or 
\begin{verbatim}
  ls dirname1 dirname2 ... dirnameN
\end{verbatim}
For compatibility with some environments, the function \verb|dir| can also be used instead of \verb|ls|.  Generally speaking, \verb|dirname| is any string that would be accepted by the underlying OS as a valid directory name.  For example, on most systems, \verb|'.'| refers to the current directory, and \verb|'..'| refers to the parent directory.  Also, depending on the OS, it may be necessary to ``escape'' the directory seperators.  In particular, if directories are seperated with the backwards-slash character \verb|'\\'|, then the path specification must use double-slashes \verb|'\\\\'|. Two points worth mentioning about the \verb|ls| function:
\begin{itemize}
\item  To get file-name completion to work at this time, you must use one of the first two forms of the command.

\item  If you want to capture the output of the \verb|ls| command, use the \verb|system| function instead.

\end{itemize}

\subsection{Example}

First, we use the simplest form of the \verb|ls| command, in which the directory name argument is given unquoted.
\begin{verbatim}
--> ls m*.m


\end{verbatim}
Next, we use the ``traditional'' form of the function call, using both the parenthesis and the quoted string.
\begin{verbatim}
--> ls('m*.m')


\end{verbatim}
In the third version, we use only the quoted string argument without parenthesis.  
\begin{verbatim}
--> ls 'm*.m'


\end{verbatim}
