Go Back   Northcode Support > Coffee Lounge
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 2012-02-23, 02:21 PM   #1
jprivett
Registered User
 
Join Date: Feb 2012
Posts: 17
Unhappy browsers delete localhost data as well.

So, apparently people are really scared of being sued this days when others use the right grouping of words in a sentence.

And due to this fear, it has made in sanctuary game development a bit complicated.

I am working on an application that deploys on the desktop and relies on local SO files.
The parameters of the project requires that it be independent of the internet and able to store/ retrieve dynamically created variables/data on the fly.

However with the browsers deleting the data in the designated local directory without discernment of the data being locally generated or remotely has caused a small issue.

I am wondering if there is a way to detect if a browser is open via the projector.
If so, could I use a batch file to copy the files from the localhost directory to another directory of my choosing upon detecting if a browser has been open and then copy the files back to the localhost directory after the browser process has been killed.

I know that the batch file can be used to move the files, but you still have a timing issue if a user opens the browser while in progress of using the application and if they have their browser set to clear browser data upon closure, then all progress is lost.

I am also wondering, is there an easier way to overcome this dilemma?

All help, ideas and thoughts are greatly appreciated.

-James
jprivett is offline   Reply With Quote
Old 2012-02-24, 02:53 AM   #2
northcode
Tim
 
northcode's Avatar
 
Join Date: May 2001
Location: Ottawa
Posts: 11,873
If you're using SWF Studio then why bother with SO files at all? You can store and retrieve data using the FileSys plugin and you can put the files you use to store your data anywhere you want. The best place would be in the approved "application data" folder where your app will have permission to read and write with impunity.
northcode is offline   Reply With Quote
Old 2012-02-24, 09:34 AM   #3
jprivett
Registered User
 
Join Date: Feb 2012
Posts: 17
Cool Thanks few questions.

So without having to make too many changes to my code base that is already saving the SO's, I assume I would just need to use the following bits to create the stored data, append the data and retrieve the data.

ssCore.FileSys.specialFolder or ssCore.FileSys.createDir
ssCore.FileSys.writeToFile
ssCore.FileSys.appendToFile
ssCore.FileSys.readFile

So I am also going to assume that some how I will need to make sure the file('s) and directory exists or not first.

ssCore.FileSys.dirExists
ssCore.FileSys.fileExists

Is there anything else that I should be doing as a best practice when using these methods?

Thanks again for all of your help in the matter, I greatly appreciate it.

-James
jprivett is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes