Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

monitoring a directory

Thread view: 
mc kinzy - 03 Jul 2007 11:54 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.