Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6013269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:31:27+00:00 2026-05-23T02:31:27+00:00

I just saw an awesome feature with java 7, the directory watcher. It’ll tell

  • 0

I just saw an awesome feature with java 7, the directory watcher. It’ll tell you when something changed in a directory without polling the directory.

1.) But it says it falls back to polling if the filesystem doesn’t support registering for change events. Do all typical linux and windows filesystems(extX,ntfs,reiserXXX,jsf,zfs) support this feature?

2.) Is renaming a file inside a directory a create or a change event? Or is that one delete and one create? I can test it on one system, but will it then be the same for all filesystems?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:31:28+00:00Added an answer on May 23, 2026 at 2:31 am

    It looks like you’re talking about the WatchService.

    The wording of the ENTRY_CREATE event says that a new entry would be perceived if a new file is created or a file is renamed into the directory. It lacks specification of what events are fired if a file is renamed and remains in the same directory.

    The wording also states that whether the service is based on the operating system or polling is implementation dependent. I suspect that’s implementation by the JRE, so even if you know a particular OS supports it, it’s not a guarantee that the service will use the OS-level functionality or resort to polling. In fact, the service does not provide any way to tell whether it is using polling or an OS-level feature at all.

    The operations the API define also do not behave like a Listener. The WatchService does do automatic watching, but to acquire the list of events which happen, you still have to manually request the seen events from the service. It doesn’t appear to provide any hooks to automatically get called when a new event is present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just saw something unusual behavior in Google Chrome's inbuilt spell check feature. This
I just saw this topic: Datatable vs Dataset but it didn't solve my doubt
I saw this post Ruby on Rails - Awesome nested set plugin but I
I just saw this data-structure on the Java 6 API and I'm curious about
i just saw an excellent feature on textmate , search in project, you just
I just saw something odd, I'm using Google Chrome browser and I right clicked
I just saw this question and it reminds me of something I usually do
I just saw a member function like this: public Cat nextCat(GameState state); But Cat
I just saw this code if ((fsi.Attributes & FileAttributes.Directory) == FileAttributes.Directory) { //... }
Just saw wiki article ios version history , which says that ios 5 is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.