Android: FileObserver monitors only top directory -
according documentation,
"each fileobserver instance monitors single file or directory. if directory monitored, events triggered files , subdirectories inside monitored directory."
my code goes like,
fileobserver fobsv = new fileobserver("/mnt/sdcard/") { @override public void onevent(int event, string path) { system.out.println(event+" "+path); } }; fobsv.startwatching();
however, onevent()
triggering when file changed in /mnt/sdcard/. if create file in /mnt/sdcard/downloads/, method not getting fired.
is there problem code?
according documentation
the documentation incorrect, noted in this issue.
is there problem code?
no, fileobserver
not recursive, despite documentation contrary.
Comments
Post a Comment