I need some points on:
How can one read/recover deleted files, in Java code. I’ve used before
for file read&write operations, clases from java.io, such as
FileInputStream, FileReader, etc., but that’s obviously not going to
work
So anyone, some points, theory, maybe a link… there has to be a way!
Be aware that on some OS it is nearly impossible to restore a deleted file.
When you talking about Windows filesystems, then with some JNI code you may access the filesystem and reset the delete flag.
Obviously if it is your program that delete files, you may move them into a bin folder, from which you can restore if needed.
Another option could be to write some service that monitors filesystem activity and may copy files into a bin for later restore. Read about jnotify.