Is there a function in Emacs to check whether a given existing file lies somewhere "under" a (root) directory, that is anywhere inside the tree structure of the root directory.
Check find-name-dired
or find-dired
.
They use the using the find utility
.