\subsection{Userlevel Utilities}

  The {\em mac} library provides a set of Unix-like file access
functions and simulates an open-file table.  The library is useful in
those situations where VFS is not an option.  Using the library, we
have written a set of user commands which provide the ability to
access Macintosh volumes. The commands provided mimic the familiar
Unix commands {\em ls}, {\em cd}, {\em rm}, {\em rmdir}, {\em mkdir},
{\em cp} and {\em mv}.

  There were two problems with providing a command-line interface to a
Macintosh filesystem.  The first problem is that the Macintosh allows
file names with non-printable, non-ASCII, and null characters.  Our
``solution'' to this was to dismiss this problem as a failure of the
text user interface that could be fixed within a graphical interface.
We point out that popular shell layers like Gnu-Emacs support the use
of special characters in command lines.

  The second problem relates to the inablility to distinguish a
Macintosh filename from a UNIX filename.  This is not a problem for
commands like {\em macls} which know that their argument is a
Macintosh pathname, but if the user wants to use {\em maccp} to
transfer a file from a Macintosh filesystem to a UNIX filesystem this
is a problem. The only unambiguous solution to this is to have
seperate functions for {\em cp} and {\em mv} which explicitly know the
type of their arguments, like {\em u2mcp} which copies a file from a
UNIX filesystem to a Macintosh filesystem. To allow relative path
names to be used in commands accessing the Macintosh filesystem the
{\em maccd} command stores the current working directory (CWD) on the
Macintosh filesystem in a file so that the other {\em mac} commands
all have the same CWD.
