windows - How can I atomically replace a file on a webserver so it's latest version is continually available? -


I am working on a project that generates Google Earth KML files and files in a web-accessible directory Saves. It's running on Windows with ActivePerl (not my favorite platform but it is I should work with it.)

I am using this method: temp.kml , use File :: Copy Use temp.kml to copy real.kml this happens once.

Google Earth captures real.kml through the APK2 webserver. The problem is, when Google Earth is copying real.kml to temp.kml on real.kml , then errors Is thrown away.

I think that this is a good opportunity that it is indispensable, but is there any way that I can reduce the frequency of errors?

Instead of copying the file, after its processing has finished, it will be sent from its Temple directory Why not put the web directory? If your temporary directory is in the form of a web directory on the same file system, then the result should be the name of the file only, while the content will remain unchanged. There should be a small chance of running the race.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -