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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -