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

Breadcrumb

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

function vfsStreamWrapper::splitPath

splits path into its dirname and the basename

Parameters

string $path:

Return value

string[]

6 calls to vfsStreamWrapper::splitPath()
vfsStreamWrapper::createFile in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
creates a file at given path
vfsStreamWrapper::doPermChange in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
executes given permission change when necessary rights allow such a change
vfsStreamWrapper::doUnlink in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
removes a path
vfsStreamWrapper::mkdir in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
creates a new directory
vfsStreamWrapper::rename in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
rename from one path to another

... See full list

File

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

Class

vfsStreamWrapper
Stream wrapper to mock file system requests.

Namespace

org\bovigo\vfs

Code

protected function splitPath($path) {
    $lastSlashPos = strrpos($path, '/');
    if (false === $lastSlashPos) {
        return array(
            'dirname' => '',
            'basename' => $path,
        );
    }
    return array(
        'dirname' => substr($path, 0, $lastSlashPos),
        'basename' => substr($path, $lastSlashPos + 1),
    );
}

API Navigation

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