According to the documentation,
\"Each FileObserver instance monitors a single file or directory. If a directory is monitored, events will be triggered for
According to the documentation
The documentation is incorrect, as is noted in this issue.
Is there any problem with the code?
No, but FileObserver is not recursive, despite the documentation to the contrary.
FileObserver