Next: files Up: MacAnova Help File Previous: fastanova()   Contents

file_names

Keywords: files, input, output
                              Introduction
This topic summarizes information about the names of files recognized by
MacAnova, absolute and relative path names, and the use of '~' and
variable HOME in abbreviating file names.

See topic 'files' for information on the default directory or folder.

See topic 'DATAPATHS' for information on CHARACTER vector DATAPATHS and
how it specifies where MacAnova searches for files.

                               File names
You specify a file name by a quoted string or CHARACTER scalar (see
topic 'scalars') such as "macanova.dat".  It must be a legal file name
for your system.  When MacAnova decides it is not a legal name it prints
the message
   ERROR: improper file name xxxxxxx.

On some systems, the checks exclude some technically legal file names.
For example, in Unix/Linux, MacAnova objects to names starting with '-'
such as "-savefile" and on a Macintosh, it objects to file names
starting with '.' such as ".savefile", because their use often leads to
difficulties.

The DOS version does not recognize long file names.

                        Use of "" as a file name
In versions with windows, you can always use the 'empty string' "" as
a file name.  This brings up a dialog box in which you can select a
folder and a file.  It also may change the default directory or folder. 
See topic 'files'.

                               Path names
If your file name includes directory or folder information, it is a
'path name' and can be relative or absolute.  In the next paragraphs,
for a Macintosh or Windows 95/98/NT, 'directory' should be taken to mean
'folder'.  This information is fairly technical.

Relative paths
  Under DOS/Windows, Unix/Linux, and Mac OS X a file name that specifies
  a relative path might be "../data.dir/mydata" or 
  "tseries.dir/tseries.dat" (under Windows or DOS you could replace '/' 
  by '\\').

  On Mac OS 9, a relative path starts with ":".  Examples would be
  "::data.dir:mydata" and ":tseries.dir:tseries.dat".

  These examples specify a file 'mydata' in a directory 'data.dir' in
  the "parent" directory of the default directory, and a file
  'tseries.dat' in a sub-directory 'tseries.dir' in the default
  directory.

Absolute paths
  On Unix/Linux and Mac OS X, "/usr/lib/macanova/survey.dat" is a 
  typical absolute path name.  It must start with '/'.

  On Windows and DOS an absolute path name starts with '/' or 'X:/'
  where 'X' is a designator such as 'A' or 'C' of a disk drive.  For
  example, if the current DOS default drive is drive 'C', both
  "C:/data.dir/survey.dat" and "/data.dir/survey.dat" specify the same
  file.

  On Mac OS 9, an absolute path name starts with a disk name and
  contains at least one ":".  Example: "MyFloppy:data.dir:survey.dat".

               Use of '~' in file names and variable HOME
You may be able to use an abbreviated file name like "~/Name" or 
"~:Name" (Mac OS 9), where "Name" is the name of a file.  For this to
work, a CHARACTER scalar HOME must exist and contain the complete name
(absolute path) of a directory.  For example, in Windows if HOME is 
"C:/SURVEY", the "~/mydata.dat" becomes "C:/SURVEY/mydata.dat". On 
Mac OS 9, when HOME is "MyFloppy:Survey", "~:mydata.dat" becomes 
"MyFloppy:Survey:mydata.dat".

On Unix/Linux, Mac OS X, and most versions of Windows, HOME is
predefined to be the user's home directory (for example, /hom/gary
or /Users/gary or c:/Documents and Settings/gary).  On DOS, HOME 
is pre-defined to be the full name of the directory where the 
executable MacAnova program is located.  You can override the default
for HOME using command line option -home.  See topics 'launching'
and 'customize'.

On Unix/Linux computers, a file name of the form ~name/filename, where
name is the log in name of another user, ~name is translated to the name
of that user's home directory, following a convention used in the csh
shell.


Gary Oehlert 2005-08-12