PHP 클래스 VersionPress\Utils\PathUtils

파일 보기 프로젝트 열기: versionpress/versionpress 1 사용 예제들

공개 메소드들

메소드 설명
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