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

Breadcrumb

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

function Filesystem::isAbsolutePath

Same name in this branch
  1. 11.1.x vendor/composer/composer/src/Composer/Util/Filesystem.php \Composer\Util\Filesystem::isAbsolutePath()

Returns whether the file path is an absolute path.

1 call to Filesystem::isAbsolutePath()
Filesystem::makePathRelative in vendor/symfony/filesystem/Filesystem.php
Given an existing path, convert it to a path relative to a given starting path.

File

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

Class

Filesystem
Provides basic utility to manipulate the file system.

Namespace

Symfony\Component\Filesystem

Code

public function isAbsolutePath(string $file) : bool {
    return '' !== $file && (strspn($file, '/\\', 0, 1) || \strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && strspn($file, '/\\', 2, 1) || null !== parse_url($file, \PHP_URL_SCHEME));
}

API Navigation

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