You are here

public function vfsStreamFile::unlock in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php \org\bovigo\vfs\vfsStreamFile::unlock()

Removes lock from file acquired by given resource

Parameters

resource|vfsStreamWrapper $resource:

See also

https://github.com/mikey179/vfsStream/issues/40

1 call to vfsStreamFile::unlock()
vfsStreamFile::lock in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php
locks file for

File

vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php, line 300

Class

vfsStreamFile
File container.

Namespace

org\bovigo\vfs

Code

public function unlock($resource) {
  if ($this
    ->hasExclusiveLock($resource)) {
    $this->exclusiveLock = null;
  }
  if ($this
    ->hasSharedLock($resource)) {
    unset($this->sharedLock[$this
      ->getResourceId($resource)]);
  }
}