* @return string
*/
static public function getMountPoint($path) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
$mount = self::$mounts->find($path);
if ($mount) {
return $mount->getMountPoint();
* @return string[]
*/
static public function getMountPoints($path) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
$result = array();
$mounts = self::$mounts->findIn($path);
foreach ($mounts as $mount) {
* @return \OC\Files\Storage\Storage
*/
public static function getStorage($mountPoint) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
$mount = self::$mounts->find($mountPoint);
return $mount->getStorage();
}
* @return Mount\Mount[]
*/
public static function getMountByStorageId($id) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
return self::$mounts->findByStorageId($id);
}
* @return Mount\Mount[]
*/
public static function getMountByNumericId($id) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
return self::$mounts->findByNumericId($id);
}
* @return array consisting of the storage and the internal path
*/
static public function resolvePath($path) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
$mount = self::$mounts->find($path);
if ($mount) {
return array($mount->getStorage(), $mount->getInternalPath($path));
}
self::$defaultInstance = new View($root);
- if(!self::$mounts) {
+ if (!self::$mounts) {
self::$mounts = new Mount\Manager();
}
return true;
}
- static public function initMounts(){
- if(!self::$mounts) {
+ static public function initMounts() {
+ if (!self::$mounts) {
self::$mounts = new Mount\Manager();
}
}
* @param string $mountpoint
*/
static public function mount($class, $arguments, $mountpoint) {
+ if (!self::$mounts) {
+ \OC_Util::setupFS();
+ }
$mount = new Mount\Mount($class, $mountpoint, $arguments);
self::$mounts->addMount($mount);
}