5

We have to delete some directories and their contents using Java running on Windows.

I was worried about running into the directory files being locked.

We could just invoke Unlocker to do the delete. Or is there a more Java centric way to handle this situation?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Marcus Leon
  • 55,199
  • 118
  • 297
  • 429
  • 1
    Was there any Java code responsible for creating those directories and files before? – BalusC May 21 '10 at 20:43
  • Some of the files, yes. And some, no. All the files will have been created days or weeks prior to attempting the delete. – Marcus Leon May 21 '10 at 20:44

1 Answers1

4

Java has a very simplistic access to the file system. You can't do this without using some native libraries.

tangens
  • 39,095
  • 19
  • 120
  • 139