Re: temp directory question
- From: kimiraikkonen <kimiraikkonen85@xxxxxxxxx>
- Date: Sun, 6 Apr 2008 01:05:38 -0700 (PDT)
On Apr 6, 8:13 am, "Aussie Rules" <aus...@xxxxxxxxxx> wrote:
Hi,
In my application I need to write an XML file to disk, but am concerned that
permission might be a problem.
The file only needs to be written out and used for another reason and can
then be deleted.
I was thinking about using the windows/system temp directory as the
location, as I guess that a directory where my application shouldn't have an
issue writting to.
Is this the best location for this file to go? and how do I determine what
the temp directory is ?
Thanks
If you have any difficulty about writing to a specific folder such as
temp (plus you may able to write), create your own temp folder in your
application folder then delete folder / file after operation has
finished.
For example when you need a folder temporarily, create a new one
using:
System.IO.Directory.CreateDirectory("c:\your_app\your_folder")
Then you can delete folder fairly after the directory is not needed
anylonger using:
(usually when formclosing event is fired)
System.IO.Directory.Delete("c:\your_app\your_folder")
Therefore you have a folder that's created and deleted temporarily,
just my opinion.
Regards,
Onur Güzel
.
- Follow-Ups:
- Re: temp directory question
- From: RobinS
- Re: temp directory question
- References:
- temp directory question
- From: Aussie Rules
- temp directory question
- Prev by Date: Re: temp directory question
- Next by Date: Wholesale ESQ-Mens-Watch-07300901 Cheapest
- Previous by thread: Re: temp directory question
- Next by thread: Re: temp directory question
- Index(es):
Relevant Pages
|
Loading