Filesystem notifications in Java





Inspired by an OS that went in oblivion some years ago (BeOS) operating systems as Windows, Linux and MacOS all have ways to monitor directories for changes built into the filesystem: meaning if a directory is changed because a file or directory is added, removed or changed you can get an event. There’s need for running a program that periodically monitors the directory (nor does the OS do that, it’s build into the filesystem). Software like Dropbox and other filesyncing products use this, so whenever you change or update a file it’s immediately updated to the ‘cloud’.
The name of the API’s for the listed OS’s are:

There are a number of open source libraries that allow you to use that API in Java, not all cross-platform. Fortunately, since Java 7 watching directories is now part of the default java.nio.file API.


Sr Software Consultant

Geplaatst in Technology

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

*

De volgende HTML-tags en -attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Google

Bol.com