giga Well-Known Member Licensed User Longtime User Oct 27, 2021 #1 I have been testing the jFileWatcher library and ran into an issue. I have a D:\Data drive that I want to watch for any changes but here is what happens. If I specify a folder(D:\Data) to monitor on the drive it will detect the file deletions and file modifications-Great B4X: Copy fw.SetWatchList(Array As String("d:\Data")) But if I don't specify a folder and select the whole drive (D:\) it will only pick up the file deletions but not the file modifications. B4X: Copy fw.SetWatchList(Array As String("d:\")) Any help is appreciated as always.
I have been testing the jFileWatcher library and ran into an issue. I have a D:\Data drive that I want to watch for any changes but here is what happens. If I specify a folder(D:\Data) to monitor on the drive it will detect the file deletions and file modifications-Great B4X: Copy fw.SetWatchList(Array As String("d:\Data")) But if I don't specify a folder and select the whole drive (D:\) it will only pick up the file deletions but not the file modifications. B4X: Copy fw.SetWatchList(Array As String("d:\")) Any help is appreciated as always.
EnriqueGonzalez Expert Licensed User Longtime User Oct 27, 2021 #2 According to docs WatchService (Java SE 10 & JDK 10 ) docs.oracle.com If a watched file is not located on a local storage device then it is implementation specific if changes to the file can be detected. In particular, it is not required that changes to files carried out on remote systems be detected. Click to expand... Upvote 0
According to docs WatchService (Java SE 10 & JDK 10 ) docs.oracle.com If a watched file is not located on a local storage device then it is implementation specific if changes to the file can be detected. In particular, it is not required that changes to files carried out on remote systems be detected. Click to expand...
giga Well-Known Member Licensed User Longtime User Oct 28, 2021 #3 @EnriqueGonzalez thanks for the response. I have read the docs and discovered the issue is a bug in the Java library itself. If I use the class in Java directly it does the same thing even if I change the drive to C: it doesn't detect modifications either, a directory in the drive has to be specified. If anyone finds a workaround please let me know. My end goal is to watch the entire drive(not just a single directory). Upvote 0
@EnriqueGonzalez thanks for the response. I have read the docs and discovered the issue is a bug in the Java library itself. If I use the class in Java directly it does the same thing even if I change the drive to C: it doesn't detect modifications either, a directory in the drive has to be specified. If anyone finds a workaround please let me know. My end goal is to watch the entire drive(not just a single directory).