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

Malcolm Parsons malcolm.parsons@virgin.net
Fri, 23 Jul 2004 21:48:16 +0100


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 = "C:\\temp\myfile";
>    }
>    elsif (LINUX || UNIX)
>    {
>       path = "/tmp/myfile";
>    }

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

-- 
Malcolm Parsons