Example #1
0
 public function testChangeLock()
 {
     Filesystem::initMountPoints($this->recipientUid);
     $recipientView = new View('/' . $this->recipientUid . '/files');
     $recipientView->lockFile('bar.txt', ILockingProvider::LOCK_SHARED);
     $recipientView->changeLock('bar.txt', ILockingProvider::LOCK_EXCLUSIVE);
     $recipientView->unlockFile('bar.txt', ILockingProvider::LOCK_EXCLUSIVE);
     $this->assertTrue(true);
 }
Example #2
0
File: node.php Project: evanjt/core
 /**
  * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
  */
 public function changeLock($type)
 {
     $this->fileView->changeLock($this->path, $type);
 }