[owncloud-devel] API function to get data directory

Christoph Johannes Kleine erstescello at yahoo.de
Thu Apr 21 13:01:28 GMT 2016



Am 21.04.2016 um 14:33 schrieb Mathieu Fourcroy:
> Hi,
>
> I am developing some features for owncloud. And I need to get the path
> of files for a given user.
> Physically, for user "admin" files are in
> "/var/www/owncloud/data/admin/files/".
>
> I am building the path with something like:
>
> $path = '/var/www/owncloud/data/' . $user->getDisplayName() .
> '/files/' . $fileName;
>
> This is not very portable so my question is, how to get the string
> '/var/www/owncloud/data/' using the existing API ?
Just read 'datadirectory' variable from config/config.php it contains
what you want.


More information about the Devel mailing list