I have an app that listens for a certain file. The file is a JPEG that is about 669 KB in size. Once it finds it, it loads it. The app also deletes the file then listens for a new file with the same name to appear. The problem is that I cannot get the file deleted fast enough before the app wants to load it again. I have tried to put the deletion in a loop but it gets stuck there. Example:
while(!someFile.delete())
{
try
{
Thread.sleep(100);
}
catch(IOException ioe)
{
}
}
Any help will be greatly appreciated.
Warren Bell
Netricks
warren@netricks.net