2017-05-25 13:16:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* User data helper
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get and returns the URL path to an userdata file
|
|
|
|
*
|
|
|
|
* @param String $fileURI Optionnal, defines the URI pointing on the file
|
2017-05-26 07:50:20 +00:00
|
|
|
* @param Boolean $systemPath Optionnal, defines if system path is required instead of URL
|
2017-05-25 13:16:34 +00:00
|
|
|
* @return String The full URL to the userdata file
|
|
|
|
*/
|
2018-01-06 17:25:05 +00:00
|
|
|
function path_user_data(string $fileURI = "", bool $systemPath = false) : string {
|
2017-05-26 07:50:20 +00:00
|
|
|
if(!$systemPath)
|
|
|
|
return CS::get()->config->get("storage_url").$fileURI;
|
|
|
|
else
|
|
|
|
return CS::get()->config->get("storage_path").$fileURI;
|
2017-05-25 13:16:34 +00:00
|
|
|
}
|