{"id":107,"date":"2007-12-01T17:58:00","date_gmt":"2007-12-01T17:58:00","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/?p=107"},"modified":"2007-12-01T17:58:00","modified_gmt":"2007-12-01T17:58:00","slug":"jnotify-was-tut-sich-im-dateisystem","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2007\/12\/jnotify-was-tut-sich-im-dateisystem\/","title":{"rendered":"JNotify: Was tut sich im Dateisystem?"},"content":{"rendered":"<p>Die kleine (native) unter Linux und Windows arbeitende Bibliothek <a href=\"http:\/\/jnotify.sourceforge.net\/\">JNotify<\/a> meldet \u00c4nderungen an Dateien. Ein Beispiel:<\/p>\n<pre class=\"prettyprint\">String path = \"c:\/\";<br \/><br \/>int mask = JNotify.FILE_CREATED | JNotify.FILE_DELETED | JNotify.FILE_MODIFIED | JNotify.FILE_RENAMED;<br \/><br \/><br \/>boolean watchSubtree = true;<br \/><br \/><br \/>int watchID = JNotify.addWatch(path, mask, watchSubtree, new JNotifyListener()<br \/>{<br \/>@Override<br \/>public void fileCreated( int arg0, String arg1, String arg2 )<br \/>{<br \/> System.out.println( \"created\" );<br \/>}<br \/><br \/><br \/>@Override<br \/>public void fileDeleted( int arg0, String arg1, String arg2 )<br \/>{<br \/> System.out.println( \"deleted\" );<br \/>}<br \/><br \/>@Override<br \/>public void fileModified( int arg0, String arg1, String arg2 )<br \/>{<br \/> System.out.println( \"modified\" );<br \/>}<br \/><br \/>@Override<br \/>public void fileRenamed( int arg0, String arg1, String arg2, String arg3 )<br \/>{<br \/> System.out.println( \"renamed\" );<br \/>}<br \/>} );<br \/><\/pre>\n<p>Und am Ende:<\/p>\n<p>JNotify.removeWatch(watchID);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die kleine (native) unter Linux und Windows arbeitende Bibliothek JNotify meldet \u00c4nderungen an Dateien. Ein Beispiel: String path = &#8222;c:\/&#8220;;int mask = JNotify.FILE_CREATED | JNotify.FILE_DELETED | JNotify.FILE_MODIFIED | JNotify.FILE_RENAMED;boolean watchSubtree = true;int watchID = JNotify.addWatch(path, mask, watchSubtree, new JNotifyListener(){@Overridepublic void fileCreated( int arg0, String arg1, String arg2 ){ System.out.println( &#8222;created&#8220; );}@Overridepublic void fileDeleted( int arg0, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4],"tags":[],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-open-source"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":0,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}