How to get absolute path of shared file

A shared text.doc with B:
the absolute path of text.doc is /var/www/owncloud/data/A/files/text.doc

if i logged in with B, how can i get the absolute path? which api should i call?


What information do you have ? Do you have the fileid or the original file ?

If yes, as user B you can use \OC::$server->getUserFolder()->getById($fileId)