[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

existing directories


   maybe something is blocking my mind right now, but I just can't think
of a good (platform independent) way to test whether a directory exists
or not. I am trying to write an 'install.pro' routine (not too fancy but
at least with automatic backup of an old version and automatic creation
of the target directory if not there). Actually, since I am spawning
quite a few unix commands anyhow, a good Unix solution would be fine,

   BTW: Has anyone written a routine like this before (which is
documented)? What I have in mind (and working in a rudimentary version)
is this:
* create target directory if necessary
  or copy all files in target directory into BACKUP<date> directory
* copy all files from a masterdirectory (either by listfile or file
mask) to target directory 
  or extract them from the RCS system (version control system).

This would be a generic install routine which would come to life by
package specific caller routines (e.g. install_gamap.pro). 


Dr. Martin Schultz                   
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax  : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/