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

Breadcrumb

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

function Config::realpath

Turns relative paths in absolute paths without realpath()

Since the dirs might not exist yet we can not call realpath or it will fail.

1 call to Config::realpath()
Config::get in vendor/composer/composer/src/Composer/Config.php
Returns a setting

File

vendor/composer/composer/src/Composer/Config.php, line 555

Class

Config
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer

Code

private function realpath(string $path) : string {
    if (Preg::isMatch('{^(?:/|[a-z]:|[a-z0-9.]+://|\\\\\\\\)}i', $path)) {
        return $path;
    }
    return $this->baseDir !== null ? $this->baseDir . '/' . $path : $path;
}
RSS feed
Powered by Drupal