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

Jochen Wezel jwezel@compumaster.de
Fri, 23 Jul 2004 23:24:28 +0200


=20
Take a look to System.Environment.OSVersion.Platform to see on which =
platform you are.
-Jochen


-----Urspr=FCngliche Nachricht-----
Von: mono-list-admin@lists.ximian.com =
[mailto:mono-list-admin@lists.ximian.com] Im Auftrag von Malcolm Parsons
Gesendet: Freitag, 23. Juli 2004 22:48
An: Daniel Carrera
Cc: Mono List
Betreff: Re: [Mono-list] [Q] cross-platform paths.

On Fri, Jul 23, 2004 at 01:36:45PM -0400, Daniel Carrera wrote:
>  * To specify a full path I need to identify the OS.  Something like:
>    if (WINDOWS)
>    {
>       path =3D "C:\\temp\myfile";
>    }
>    elsif (LINUX || UNIX)
>    {
>       path =3D "/tmp/myfile";
>    }

Why not use GetTempPath() or GetTempFileName() from System.IO.Path?

--
Malcolm Parsons
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com =
http://lists.ximian.com/mailman/listinfo/mono-list