In my application, files are reviewed and when they are approved the app puts the files and an xml describing the files in a directory. The files and the xml are then retrieved and moved by a person.
When updating the directory contents, I'd like to lock the directory, update the xml file and copy the files in, then unlock it. I have to ensure that a person doesn't grab files or the xml when they aren't in sync.
Any suggestions?