Checking if a file is already in use by another application ?
Hi I would like to check if a file is already open by another application before I actually save.
I have an XML being used by an application which is running. I would like to modify that XML through another application, but wanna check if the prev app is running (which uses this xml).
In simple words
if(filepath is in use)
{
save(filepath);
}
else{
dialog(this app is being used,,,pls close other app first)
}
Note: I dont want to use exceptions. I want to prevent an exception to occur in th first place by checking in advance...any clues???
Thanks