Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/Filesystem.php
| Show First 20 Lines • Show All 1,048 Lines • ▼ Show 20 Lines | /* -( Paths )-------------------------------------------------------------- */ | ||||
| public static function concatenatePaths(array $components) { | public static function concatenatePaths(array $components) { | ||||
| $components = implode($components, DIRECTORY_SEPARATOR); | $components = implode($components, DIRECTORY_SEPARATOR); | ||||
| // 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); | |||||
| return $components; | return $components; | ||||
| } | } | ||||
| /* -( Assert )------------------------------------------------------------- */ | /* -( Assert )------------------------------------------------------------- */ | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||