Alert when one directory or file is changed.

M

Mariano2012

Hello everyone!
I need to write a java application that it can alert when one
directory is changed.

For example, If one file of the directory is added, modified or
deleted, the application alert about this change.

Previously I have to determine what is the root directory.

Thanks in advance!

Mariano
 
U

usenetuser

Hello everyone!
I need to write a java application that it can alert when one
directory is changed.

For example, If one file of the directory is added, modified or
deleted, the application alert about this change.

Previously I have to determine what is the root directory.

Thanks in advance!

Mariano

Thanks for letting us know what you will be doing. I'm not sure how
much use this knowledge is to the group, though.
 
M

Mariano2012

Thanks for letting us know what you will be doing. I'm not sure how
much use this knowledge is to the group, though.

Sorry I forgot to ask the following question, Does exist any
implementation that detect when a directory is modified or similar?

Regards,
Mariano
 
O

Oliver Wong

Mariano2012 said:
Sorry I forgot to ask the following question, Does exist any
implementation that detect when a directory is modified or similar?

Unless your OS presents you with a special API for this purpose, all
such implementations I've seen are based on polling; i.e. repeatedly
scanning the directory and/or files of interest to check if they've
changed since the last scan.

- Oliver
 
A

Alex Hunsley

Mariano2012 said:
Sorry I forgot to ask the following question, Does exist any
implementation that detect when a directory is modified or similar?

Not that I've ever heard of, unless as Oliver says someone has done a
library to assist in this task. You might roll your own.
Did you trying searching the web for keywords like "java directory
monitoring"?
lex

p.s. the java.io.File class might be useful if you're looking at writing
your own.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top