Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/Filesystem.php
| Show First 20 Lines • Show All 1,113 Lines • ▼ Show 20 Lines | public static function pathsAreEquivalent($u, $v) { | ||||
| } | } | ||||
| if ($real_v) { | if ($real_v) { | ||||
| $v = $real_v; | $v = $real_v; | ||||
| } | } | ||||
| return ($u == $v); | return ($u == $v); | ||||
| } | } | ||||
| public static function concatenatePaths(array $components) { | public static function concatenatePaths(array $components) { | ||||
| $components = implode($components, DIRECTORY_SEPARATOR); | $components = implode(DIRECTORY_SEPARATOR, $components); | ||||
| // Replace any extra sequences of directory separators with a single | // Replace any extra sequences of directory separators with a single | ||||
| // separator, so we don't end up with "path//to///thing.c". | // separator, so we don't end up with "path//to///thing.c". | ||||
| $components = preg_replace( | $components = preg_replace( | ||||
| '('.preg_quote(DIRECTORY_SEPARATOR).'{2,})', | '('.preg_quote(DIRECTORY_SEPARATOR).'{2,})', | ||||
| DIRECTORY_SEPARATOR, | DIRECTORY_SEPARATOR, | ||||
| $components); | $components); | ||||
| ▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines | |||||