Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/FileFinder.php
| Show All 29 Lines | final class FileFinder extends Phobject { | ||||
| /** | /** | ||||
| * Create a new FileFinder. | * Create a new FileFinder. | ||||
| * | * | ||||
| * @param string Root directory to find files beneath. | * @param string Root directory to find files beneath. | ||||
| * @return this | * @return this | ||||
| * @task create | * @task create | ||||
| */ | */ | ||||
| public function __construct($root) { | public function __construct($root) { | ||||
| $this->root = rtrim($root, '/'); | $this->root = rtrim( | ||||
| $root, | |||||
| phutil_is_windows() ? getenv('HOMEDRIVE') : '/'); | |||||
| } | } | ||||
| /** | /** | ||||
| * @task config | * @task config | ||||
| */ | */ | ||||
| public function excludePath($path) { | public function excludePath($path) { | ||||
| $this->exclude[] = $path; | $this->exclude[] = $path; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 241 Lines • Show Last 20 Lines | |||||