apps/files_external/lib/config.php
/**
	 * Read the mount points in the config file into an array
	 *
	 * @param string|null $user If not null, personal for $user, otherwise system
	 * @return array
	 */
Read the mount points in the config file into an array
@param string|null $user If not null, personal for $user, otherwise system
@return array
Read the mount points in the config file into an array @param string|null $user If not null personal for $user otherwise system @return array
public static function readData($user = null) {
		if (isset($user)) {
			$jsonFile = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json';
		} else {
			$config = \OC::$server->getConfig();
			$datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
			$jsonFile = $config->getSystemValue('mount_file', $datadir . '/mount.json');
		}
		if (is_file($jsonFile)) {
			$mountPoints = json_decode(file_get_contents($jsonFile), true);
			if (is_array($mountPoints)) {
				return $mountPoints;
			}
		}
		return array();
	}
public static function readData ( $ user = null ) { if ( isset ( $ user ) ) { $ jsonFile = \ OC :: $ server -> getUserManager ( ) -> get ( $ user ) -> getHome ( ) . '/mount.json' ; } else { $ config = \ OC :: $ server -> getConfig ( ) ; $ datadir = $ config -> getSystemValue ( 'datadirectory' , \ OC :: $ SERVERROOT . '/data/' ) ; $ jsonFile = $ config -> getSystemValue ( 'mount_file' , $ datadir . '/mount.json' ) ; } if ( is_file ( $ jsonFile ) ) { $ mountPoints = json_decode ( file_get_contents ( $ jsonFile ) , true ) ; if ( is_array ( $ mountPoints ) ) { return $ mountPoints ; } } return array ( ) ; }
Read the mount points in the config file into an array
 @param string|null $user If not null, personal for $user, otherwise system
 @return array
Read the mount points in the config file into an array @param string|null $user If not null personal for $user otherwise system @return array