hello every1,
i would like to monitor a directory, i.e. when it is opeaned, exited,
etc. i know i would have to create a thread for it, but can any1 help
me how to do it.
thanx in advance
mckinzy
Roedy Green - 03 Jul 2007 14:31 GMT
>i would like to monitor a directory, i.e. when it is opeaned, exited,
>etc. i know i would have to create a thread for it, but can any1 help
>me how to do it.
there is no platform independent way to do this. So read up how you do
it in C++ on platform, then write some JNI glue to it.
See http://mindprod.com/jgloss/jni.html
I am using a program called Copernic that does that. It is wonderful
the way it instantly indexes the files I have recently modified.
It is so much faster than Google Desktop and so much more accurate.
See http://mindprod.com/jgloss/copernic.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Twisted - 03 Jul 2007 22:29 GMT
On Jul 3, 9:31 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >i would like to monitor a directory, i.e. when it is opeaned, exited,
> >etc. i know i would have to create a thread for it, but can any1 help
> >me how to do it.
>
> there is no platform independent way to do this.
Yet. Change notification is planned as part of the new filesystem
interface classes in NIO2 in Java 7: http://tech.puredanger.com/java7#jsr203
Roedy Green - 03 Jul 2007 14:34 GMT
>i would like to monitor a directory, i.e. when it is opeaned, exited,
>etc. i know i would have to create a thread for it, but can any1 help
>me how to do it.
see the hints at http://mindprod.com/projects/filefinder.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Stefan Hueneburg - 04 Jul 2007 00:08 GMT
hi,
> i would like to monitor a directory, i.e. when it is opeaned, exited,
> etc. i know i would have to create a thread for it, but can any1 help
> me how to do it.
Maybe you wanna take a look to Jnotify (http://jnotify.sourceforge.net/).
It seems to work on recent Linux and Windows using native Syscalls.
cu