Ejemplo n.º 1
0
 /**
  * Preform a upgrade a path and it's childs
  *
  * @param string $path
  * @param bool $mode
  */
 function upgradePath($path, $mode = Scanner::SCAN_RECURSIVE)
 {
     if (!$this->legacy->hasItems()) {
         return;
     }
     \OC_Hook::emit('\\OC\\Files\\Cache\\Upgrade', 'migrate_path', $path);
     if ($row = $this->legacy->get($path)) {
         $data = $this->getNewData($row);
         if ($data) {
             $this->insert($data);
             $this->upgradeChilds($data['id'], $mode);
         }
     }
 }