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

Breadcrumb

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

function Filesystem::getPlatformPath

Return value

string

4 calls to Filesystem::getPlatformPath()
FossilDriver::supports in vendor/composer/composer/src/Composer/Repository/Vcs/FossilDriver.php
@inheritDoc
GitDriver::supports in vendor/composer/composer/src/Composer/Repository/Vcs/GitDriver.php
@inheritDoc
HgDriver::supports in vendor/composer/composer/src/Composer/Repository/Vcs/HgDriver.php
@inheritDoc
VcsDriver::__construct in vendor/composer/composer/src/Composer/Repository/Vcs/VcsDriver.php
Constructor.

File

vendor/composer/composer/src/Composer/Util/Filesystem.php, line 675

Class

Filesystem
@author Jordi Boggiano <j.boggiano@seld.be> @author Johannes M. Schmitt <schmittjoh@gmail.com>

Namespace

Composer\Util

Code

public static function getPlatformPath(string $path) {
    if (Platform::isWindows()) {
        $path = Preg::replace('{^(?:file:///([a-z]):?/)}i', 'file://$1:/', $path);
    }
    return Preg::replace('{^file://}i', '', $path);
}
RSS feed
Powered by Drupal