FS|libcore: Custom indices in the file system

This makes it possible to index and observe any subset of files in
the file system that fulfills the specified predicate.