" Now we are in the catch block, we just need one thing - TO DELETE THAT INCOMPLETE FILE. "
Have you checked that you actually need to do that? As I remember files opened to be written are provisional and become permanent only when the 'real' directory entry is written (when you close after having finished writing)
Main Topics
Browse All Topics





by: CEHJPosted on 2005-08-24 at 00:51:34ID: 14740396
You need to close any *stream* that's been opened on the file in a finally block. Once that's done, you should be able to delete it in the same block. Check that it exists first