How to check if folder is "lock" by a process

  • Thread starter Thread starter Alex Cote
  • Start date Start date
A

Alex Cote

Guest
Hi, I am making a program that need to delete a local folder, but sometime that folder is "lock" by another program that even once close keeps an handle on it for a certain time and it throws a IOException if i try to delete.

So, in my program I would like to check if it's still in use before I call Directory.delete().

Is there a way?

Thanks

Continue reading...
 
Back
Top