Beispiel #1
0
 /**
  * @param string $path
  * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
  * @param \OCP\Lock\ILockingProvider $provider
  */
 public function changeLock($path, $type, ILockingProvider $provider)
 {
     $provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
 }
 /**
  * @expectedException \OCP\Lock\LockedException
  */
 public function testChangeLockToSharedFromShared()
 {
     $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED);
     $this->instance->changeLock('foo', ILockingProvider::LOCK_SHARED);
 }