Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. vfsStreamFile.php

function vfsStreamFile::hasSharedLock

checks whether file is locked in shared mode

@since 0.10.0

Parameters

resource|vfsStreamWrapper $resource:

Return value

bool

See also

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

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

2 calls to vfsStreamFile::hasSharedLock()
vfsStreamFile::isLocked in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php
checks whether file is locked
vfsStreamFile::unlock in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php
Removes lock from file acquired by given resource

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php, line 352

Class

vfsStreamFile
File container.

Namespace

org\bovigo\vfs

Code

public function hasSharedLock($resource = null) {
    if (null !== $resource) {
        return isset($this->sharedLock[$this->getResourceId($resource)]);
    }
    return !empty($this->sharedLock);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal