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

Breadcrumb

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

function vfsStreamAbstractContent::isWritable

checks whether content is writable

Parameters

int $user id of user to check for:

int $group id of group to check for:

Return value

bool

Overrides vfsStreamContent::isWritable

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php, line 280

Class

vfsStreamAbstractContent
Base stream contents container.

Namespace

org\bovigo\vfs

Code

public function isWritable($user, $group) {
    if ($this->user === $user) {
        $check = 0200;
    }
    elseif ($this->group === $group) {
        $check = 020;
    }
    else {
        $check = 02;
    }
    return (bool) ($this->permissions & $check);
}

API Navigation

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