User Activity

  • Posted a comment on discussion Help on JNotify

    And second time thank you for your lib!

  • Modified a comment on discussion Help on JNotify

    Done. Function public void fileModified(int wd, String rootPath, String name) runs onModifyTimer(name) every time event occures. It is "on fly solution", but it works. Map<String, Long> fileModifyHashMap = new LinkedHashMap<>(); ... private void onModifyTimer(String relativePath) { Long current = System.currentTimeMillis(); Long prev = fileModifyHashMap.get(relativePath); if(prev != null) { if((current-prev)>300) { System.out.println("(current-prev) = " + (current-prev)); fileModifyHashMap.put(relativePath,...

  • Modified a comment on discussion Help on JNotify

    Done. Function public void fileModified(int wd, String rootPath, String name) runs onModifyTimer(name) every time event occures. Map<String, Long> fileModifyHashMap = new LinkedHashMap<>(); ... private void onModifyTimer(String relativePath) { Long current = System.currentTimeMillis(); Long prev = fileModifyHashMap.get(relativePath); if(prev != null) { if((current-prev)>300) { System.out.println("(current-prev) = " + (current-prev)); fileModifyHashMap.put(relativePath, current); onModify(relativePath);...

  • Posted a comment on discussion Help on JNotify

    Done. Idea: Map<String, Long> fileModifyHashMap = new LinkedHashMap<>(); ... private void onModifyTimer(String relativePath) { Long current = System.currentTimeMillis(); Long prev = fileModifyHashMap.get(relativePath); if(prev != null) { if((current-prev)>300) { System.out.println("(current-prev) = " + (current-prev)); fileModifyHashMap.put(relativePath, current); onModify(relativePath); } } else { fileModifyHashMap.put(relativePath, current); onModify(relativePath); } } private void onModify(String...

  • Modified a comment on discussion Help on JNotify

    Hello! Thank you for this lib! I noticed, that if file is changed, there are several modify events occures for this file. I think it is due to change size, date, lasttime access etc. Every change generate separate event? How can I merge its events to one action? For example, in standard WatchService I use Thread.sleep( 50 ) and just skip events occures at very close time. I only think use LinkedHashSet and store file paths to it, so I del duplicates. But maybe more fine method?

  • Posted a comment on discussion Help on JNotify

    Hello! Thank you for this lib! I noticed, that if file is changed, there are several modify events occures for this file. I think it is due to change size, date, lasttime access etc. Every change generate separate event? How can I merge its events to one action? For example, in standard WatchService I use Thread.sleep( 50 ) and just skip events occures at very close time.

  • Modified a comment on discussion General Discussion on VeraCrypt

    Found on https://github.com/veracrypt/VeraCrypt/issues/813 Close

  • Posted a comment on discussion General Discussion on VeraCrypt

    Fuund on https://github.com/veracrypt/VeraCrypt/issues/813 Close

View All

Personal Data

Username:
billybons2006
Joined:
2014-10-31 14:34:20

Projects

  • No projects to display.

Personal Tools

MongoDB Logo MongoDB