by now there is no comfortable way to determine if a directory contains a mounted filesystem.
vfs.fs.size reports the size root filesystem if pointed to a directory which is normally mounted. another way is to check if a file underneath the mounted directory exists - but this is not "templateable" if there is no "common" file on the mounted fs.
on linux it should check /proc/mounts, solaris /etc/mnttab, etc.