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

Breadcrumb

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

function vfsStreamWrapper::calculateMode

calculates the file mode

Parameters

string $mode opening mode: r, w, a or x:

bool $extended true if + was set with opening mode:

Return value

int

1 call to vfsStreamWrapper::calculateMode()
vfsStreamWrapper::stream_open in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
open the stream

File

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

Class

vfsStreamWrapper
Stream wrapper to mock file system requests.

Namespace

org\bovigo\vfs

Code

protected function calculateMode($mode, $extended) {
    if (true === $extended) {
        return self::ALL;
    }
    if (self::READ === $mode) {
        return self::READONLY;
    }
    return self::WRITEONLY;
}

API Navigation

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