Ejemplo n.º 1
0
 /**
  * delete versions for the given user
  *
  * @param string $user
  */
 protected function deleteVersions($user)
 {
     \OC_Util::tearDownFS();
     \OC_Util::setupFS($user);
     if ($this->rootFolder->nodeExists('/' . $user . '/files_versions')) {
         $this->rootFolder->get('/' . $user . '/files_versions')->delete();
     }
 }
Ejemplo n.º 2
0
 /**
  * remove deleted files for the given user
  *
  * @param string $uid
  */
 protected function removeDeletedFiles($uid)
 {
     \OC_Util::tearDownFS();
     \OC_Util::setupFS($uid);
     if ($this->rootFolder->nodeExists('/' . $uid . '/files_trashbin')) {
         $this->rootFolder->get('/' . $uid . '/files_trashbin')->delete();
         $query = $this->dbConnection->getQueryBuilder();
         $query->delete('files_trash')->where($query->expr()->eq('user', $query->createParameter('uid')))->setParameter('uid', $uid);
         $query->execute();
     }
 }