The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

best workdirectory for the application in ???

Hi Everyone,

whats the best place to make a temp work directory?

i dont want to make it the windows temp folder..  I currently use the Application Path\workspace

as the directory.

but it appears to be restricted in some limited accounts and in vista..

whats the best way to access and write files in directory of the system that the user is allowed to write files to?
Thursday, May 03, 2007
It seems you need to use Isolated Storage.
Friday, May 04, 2007
I try to go out of my way to make any files unless making files is the point of the application.  I use a lot of MemoryStreams where other people use temp files.  And, if you use too much memory, then Windows saves it to a workfile for you (pagefile.sys).

If I have to make work files, I try to make it an explicit configuration option in the application.  Network admins really like to fiddle with the location and no two agree where the stuff should be.
JSmith Send private email
Friday, May 04, 2007
Oh.. watch out for one gatcha with Isolated Storage.  The default quota is 10MB per application per user.
JSmith Send private email
Friday, May 04, 2007
If it's really a temporary file, use System.IO.Path.GetTempFileName to create the file in the appropriate place.

You can also use System.IO.Path.GetTempPath to get the current system temp directory.
Chris Tavares Send private email
Monday, May 07, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz