[owncloud-devel] API function to get data directory

Devin Ceartas devin at nacredata.com
Thu Apr 21 12:57:52 GMT 2016


https://github.com/scolebrook told me recently "The data directory is 
quite possibly not going to be called data and almost certainly not 
inside the server root. Get this from the $CONFIG array in config.php 
with the datadirectory key."

On 21 Apr 2016, at 8:33, Mathieu Fourcroy wrote:

> 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 ?
>
> Thanks in advance for your answers,
> Mathieu
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel



devin
--
contact info: https://nacredata.com/devin

• Amazing Tie-Dye Tee-shirts: https://www.icedyedesigns.com
• Art/Poetry/Environment: https://secure.extinctionwitness.org/support
• Support progressive climate politics: 
https://secure.voteclimatepac.org/donate/
• Forest Protection in Ohio: 
https://www.buckeyeforestcouncil.org/donate.php


More information about the Devel mailing list