You are here

public static function Helper::normalizePath in Drupal 7

Normalizes a path, removes phar:// prefix, fixes Windows directory separators. Result is without trailing slash.

Parameters

string $path:

Return value

string

3 calls to Helper::normalizePath()
Helper::determineBaseFile in misc/typo3/phar-stream-wrapper/src/Helper.php
Determines base file that can be accessed using the regular file system. For e.g. "phar:///home/user/bundle.phar/content.txt" that would result into "/home/user/bundle.phar".
PharInvocationResolver::findInBaseNames in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationResolver.php
PharInvocationResolver::resolvePossibleAlias in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationResolver.php

File

misc/typo3/phar-stream-wrapper/src/Helper.php, line 93

Class

Helper
Helper provides low-level tools on file name resolving. However it does not (and should not) maintain any runtime state information. In order to resolve Phar archive paths according resolvers have to be used.

Namespace

TYPO3\PharStreamWrapper

Code

public static function normalizePath($path) {
  return rtrim(static::normalizeWindowsPath(static::removePharPrefix($path)), '/');
}