How to get absolute path of shared file

9.1.x

#1

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?

thanks!


#2

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)