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

Breadcrumb

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

function Filesystem::getSchemeAndHierarchy

Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]).

1 call to Filesystem::getSchemeAndHierarchy()
Filesystem::tempnam in vendor/symfony/filesystem/Filesystem.php
Creates a temporary file with support for custom stream wrappers.

File

vendor/symfony/filesystem/Filesystem.php, line 739

Class

Filesystem
Provides basic utility to manipulate the file system.

Namespace

Symfony\Component\Filesystem

Code

private function getSchemeAndHierarchy(string $filename) : array {
    $components = explode('://', $filename, 2);
    return 2 === \count($components) ? [
        $components[0],
        $components[1],
    ] : [
        null,
        $components[0],
    ];
}

API Navigation

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