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

Breadcrumb

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

function vfsStreamWrapper::doPermChange

executes given permission change when necessary rights allow such a change

Parameters

string $path:

vfsStreamAbstractContent $content:

\Closure $change:

Return value

bool

1 call to vfsStreamWrapper::doPermChange()
vfsStreamWrapper::stream_metadata in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
sets metadata like owner, user or permissions

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php, line 588

Class

vfsStreamWrapper
Stream wrapper to mock file system requests.

Namespace

org\bovigo\vfs

Code

private function doPermChange($path, vfsStreamAbstractContent $content, \Closure $change) {
    if (!$content->isOwnedByUser(vfsStream::getCurrentUser())) {
        return false;
    }
    if (self::$root->getName() !== $path) {
        $names = $this->splitPath($path);
        $parent = $this->getContent($names['dirname']);
        if (!$parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
            return false;
        }
    }
    $change();
    return true;
}

API Navigation

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