Alert when one directory or file is changed.

Discussion in 'Java' started by Mariano2012, Mar 28, 2007.

  1. Mariano2012

    Mariano2012 Guest

    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
     
    Mariano2012, Mar 28, 2007
    #1
    1. Advertising

  2. Mariano2012

    Guest

    On Mar 28, 8:30 pm, "Mariano2012" <> wrote:
    > 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.
     
    , Mar 28, 2007
    #2
    1. Advertising

  3. Mariano2012

    Mariano2012 Guest

    On Mar 28, 4:44 pm, wrote:
    > On Mar 28, 8:30 pm, "Mariano2012" <> wrote:
    >
    > > 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.


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

    Regards,
    Mariano
     
    Mariano2012, Mar 28, 2007
    #3
  4. Mariano2012

    Oliver Wong Guest

    "Mariano2012" <> wrote in message
    news:...
    >
    > 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
     
    Oliver Wong, Mar 28, 2007
    #4
  5. Mariano2012

    Alex Hunsley Guest

    Mariano2012 wrote:
    > On Mar 28, 4:44 pm, wrote:
    >> On Mar 28, 8:30 pm, "Mariano2012" <> wrote:
    >>
    >>> 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.

    >
    > 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.
     
    Alex Hunsley, Mar 28, 2007
    #5
  6. Mariano2012

    Real Gagnon Guest

    Real Gagnon, Mar 28, 2007
    #6
  7. Mariano2012

    Guest

    I have written my own small utility to do this task.
     
    , Mar 29, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    714
    Rosanne
    Oct 11, 2005
  2. Sam Su
    Replies:
    0
    Views:
    345
    Sam Su
    May 17, 2004
  3. Mersh
    Replies:
    0
    Views:
    508
    Mersh
    Mar 13, 2007
  4. Ganesh
    Replies:
    0
    Views:
    565
    Ganesh
    Jun 29, 2007
  5. mxbrunet
    Replies:
    1
    Views:
    228
Loading...

Share This Page