Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

hard disk i/o and java ....urgent  RSS feed

 
chetan nain
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!