friends, using java, i need to determine if the hard disk is being written to or read from (open/copy) at any time ie. if in an os like windows, if i create a new file and try to save it to the hard disk, my java program (running perpetually in the background) should pop up a dialog box informing me that data is being written to the hard disk. this is very urgent. do reply soon
c
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
posted
0
I don't think there is a way to do this in Java. What you are asking for is a very low-level feature. You want to patch the low-level I/O routines to the harwdare to incercept all disk access requests. You would need to use JNI at the very least, and be prepared to write this code yourself in C. PLUS, it's not going to be portable at all. YOu'll have to maintain this code not only for specific hardware platforms, i/o busses, motherboards, etc, but probably for each new version of the OS that comes out...win98, winme, 2000, XP, etc. Rob