I want to test whether some paths are mapped onto remote shares before creating them, as they need to be created before their files are written two. They are sshfs paths for the time being.
A basic idea would be to check /etc/mtab and look for share a whose path is a long enough prefix for the path I'm testing, but I'm hoping that there is something which is more robust than something I will whip up at short notice.