[Mono-osx] How to get OSX temp directory?
millenomi at gmail.com
Thu Jan 8 10:22:36 EST 2009
Temp folder names are randomized on OS X to prevent a certain class of
attacks that can occur when files are placed in known-to-exist
locations. That is indeed your temporary folder. IIRC temp folders are
removed on reboot only on desktop versions of OS X.
Sent from the field; excuse the brevity -- ev
Il giorno 08/gen/09, alle ore 15:35, d_v
<dan.vandermolen at figpsoft.com> ha scritto:
> Sounds like a good idea, though it gives me the temp path for the
> logged in user in Windows.
> But on my Mac Mini it gives some weird folder name that I am hoping
> will be
> available for the session (at least 30 minutes) called:
> Does that sound correct?
> I was using System.Environment.GetEnvironmentVariable("TMP",
> EnvironmentVariableTarget.Machine)) because I thought it would be
> best for
> all client computers and gives me a consistent temp location for my
> services on all computers (Win 2000 and up)
> I also have a test application that is the same code but a win
> form. Now I
> am trying to convert both programs to work on mono on Mac OS X.
> But I will use this temp folder if a Mac computer and the other if a
> computer. I wish I could use the same code though....
> PABLOSANTOSLUAC at terra.es wrote:
>> Why don't you just use:
>> We do it with Plastic all the time.
>> d_v escribió:
>>> How do I get the system temp directory from a Mac?
>>> EnvironmentVariableTarget.Machine)) works in Windows but not on
>>> Mac OS X
>>> 10.5.6. and Mono 2.2. RC1
>>> I also tried "TMP", "tmp" but to no avail.
>>> I am trying to write on application for both Windows and Mac OS X.
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
> View this message in context: http://www.nabble.com/How-to-get-OSX-temp-directory--tp21337022p21352925.html
> Sent from the Mono - OSX mailing list archive at Nabble.com.
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
More information about the Mono-osx