$config = \OC::$server->getConfig();
$datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');


Am 21.04.2016 um 15:01 schrieb Christoph Johannes Kleine:

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.
_______________________________________________
Devel mailing list
Devel@owncloud.org
http://mailman.owncloud.org/mailman/listinfo/devel

--
Dr. Jörn Friedrich Dreyer
Solutions Architect
ownCloud GmbH

Your Data, Your Cloud, Your Way!

ownCloud GmbH, GF: Markus Rex, Holger Dyroff, Frank Karlitschek
Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)

_______________________________________________
Devel mailing list
Devel@owncloud.org
http://mailman.owncloud.org/mailman/listinfo/devel

Reply via email to