I want to listen for changes in a file that may not exist or may be deleted and re-created

There are some cases where you want to listen for changes in a file or folder that does not exist, or may be created and deleted on the fly.

As of NetBeans 6.7, you can use FileUtil.addFileChangeListener(FileChangeListener, File) to listen for such changes. There is also FileUtil.addRecursiveListener

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo