Add a Filesystem::isAbsolutePath method as this functionality is fairly general purpose and reusable.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rPHUee6d0c3fe26e: Add an isAbsolutePath method
This logic has just been moved from Filesystem::resolvePath.
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Specifically, this code is good if you rename the method to isAbsolutePath(), or this method name is fine if you invert the logic and invert the return value before assigning. But this is setting $is_absolute = is_relative(), which doesn't make sense, and isRelativePath() is returning true for absolute (i.e., not relative) paths.