[Mono-list] [Q] cross-platform paths.

Daniel Carrera dcarrera@math.umd.edu
Fri, 23 Jul 2004 13:36:45 -0400


Hello,

I have a couple of questions about paths in a cross-platform app:

 * Can I use forward slashes under Windows?  For relative paths?
   ie.  "somedir/myfile".

 * To specify a full path I need to identify the OS.  Something like:
   if (WINDOWS)
   {
      path = "C:\\temp\myfile";
   }
   elsif (LINUX || UNIX)
   {
      path = "/tmp/myfile";
   }
   
I just read on another post that there is an Environment class.  But I 
can't find it in the class list.  Where is it?

 * Does anyone here know Mac OS X? How do you specify a path?  Where is
   the 'tmp' directory of OS X?  Does Gtk# work on OS X?

Thanks for the help.

Cheers
-- 
Daniel Carrera | No trees were harmed in the generation of this
PhD student.   | e-mail.  A significant number of electrons were,
Math Dept. UMD | however, severely inconvenienced.