-1

Whenever we delete a file via programme , i am using java . I want windows system to show an automatic warning that files are being deleted, even by programme which uses java.io package.

I want to intercept all files present on my hard drive to show confirmation when deleted , no matter how they are deleted , by a java programme or any other or manually , just a warning message must be displayed .

This is important, my friend lost her job due to this . I am glad to accept your help .

Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
Sahil Gupta
  • 73
  • 1
  • 3
  • 12
  • Sorry for your friend, but you'll have to be a bit more specific on what you're trying to do. You want a program you wrote to ask for confirmation before it deletes a file? Do you want to intercept *all* files deletion done by any program? – Federico klez Culloca Jun 21 '18 at 10:33
  • I want to intercept all files present on my hard drive to show confirmation when deleted , no matter how they are deleted , by a java programme or any other or manually , just a warning message must be displayed . – Sahil Gupta Jun 21 '18 at 10:35

1 Answers1

0

The same question had been ask in C++, i am affraid that the answer is the same for java you could not intercept your OS action. In Java at least the OS manage your programme and not the opposite. please read this for further informations :

Intercept FIleSytemCall for Deletion