Ejemplo n.º 1
0
 /**
  * get the part of the path relative to the mountpoint of the storage it's stored in
  * @param  string  path
  * @return bool
  */
 public function getInternalPath($path)
 {
     if (!isset($this->internal_path_cache[$path])) {
         $this->internal_path_cache[$path] = OC_Filesystem::getInternalPath($this->getAbsolutePath($path));
     }
     return $this->internal_path_cache[$path];
 }
Ejemplo n.º 2
0
 public function testMount()
 {
     OC_Filesystem::mount('OC_Filestorage_Local', self::getStorageData(), '/');
     $this->assertEqual('/', OC_Filesystem::getMountPoint('/'));
     $this->assertEqual('/', OC_Filesystem::getMountPoint('/some/folder'));
     $this->assertEqual('', OC_Filesystem::getInternalPath('/'));
     $this->assertEqual('some/folder', OC_Filesystem::getInternalPath('/some/folder'));
     OC_Filesystem::mount('OC_Filestorage_Local', self::getStorageData(), '/some');
     $this->assertEqual('/', OC_Filesystem::getMountPoint('/'));
     $this->assertEqual('/some/', OC_Filesystem::getMountPoint('/some/folder'));
     $this->assertEqual('/some/', OC_Filesystem::getMountPoint('/some/'));
     $this->assertEqual('/', OC_Filesystem::getMountPoint('/some'));
     $this->assertEqual('folder', OC_Filesystem::getInternalPath('/some/folder'));
 }
 /**
  * get the part of the path relative to the mountpoint of the storage it's stored in
  * @param  string  path
  * @return bool
  */
 public function getInternalPath($path)
 {
     return OC_Filesystem::getInternalPath($this->getAbsolutePath($path));
 }