PHP Класс VersionPress\Utils\PathUtils

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getRelativePath ( string $from, string $to ) : string Calculates relative path from two absolute paths.

Приватные методы

Метод Описание
countCommonDepth ( $from, $to )
realpath ( array $pathFragments ) : array Removes '.' and '.
windowsFix ( string $path ) : string Converts '\' to '/' and makes disk drive (e.g., C:) case insensitive

Описание методов

getRelativePath() публичный статический Метод

Calculates relative path from two absolute paths.
public static getRelativePath ( string $from, string $to ) : string
$from string It has to be a directory!
$to string Directory or file the relative path will lead to.
Результат string