|
-
May 22nd, 2012, 04:22 PM
#1
Thread Starter
Lively Member
What's the best location to write files to? (on the end-user's hard drive)
Hey guys,
So I'm working on an app that needs to create files on the end user's computer to store info in (mainly text files and HTML files), and I'm trying to figure out the best location to write these files to. I've been reading various articles @ this online all afternoon, and the advice I've read so far seems to be "all over the place" , so I thought I'd come here and get some feedback from you guys about this.
From what I understand, if the end user is not logged into Windows as "admin", then there are a limited number of locations where files can be written to their computer, without them having to deal with UAC popups, etc.
From what I've read so far, these locations are...
* App Data folder (My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData)
* Temp folder (System.IO.Path.GetTempPath)
Is that correct? And are there any other locations?
I would like my end-user's to have to jump through as few hoops as possible (none, preferably ), so should I only write my files to these specific locations?
FYI... when I write the files to the end-user's computer, I have 2 different types of info that needs to be stored...
Info "A" is temporary data that only needs to be stored/accessed while the end user has my program open (and this data can be safely deleted each time they close my program).
Info "B" needs to be stored somewhere where it never gets deleted, so that it can be accessed by my program for as long as the end-user has my program installed on their computer.
So would it be best to store info "A" in the Temp folder, and info "B" in the App Data folder?
And for any files that I store in the "temp" folder, do these files get automatically deleted when the end-user turns off their computer, or do I have to programatically delete these files every time my program exits?
Any advice on this would be greatly appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|