| @@ 587-598 (lines=12) @@ | ||
| 584 | * @return string |
|
| 585 | * @author Dmitry (dio) Levashov |
|
| 586 | **/ |
|
| 587 | protected function _relpath($path) { |
|
| 588 | if ($path === $this->root) { |
|
| 589 | return ''; |
|
| 590 | } else { |
|
| 591 | if (strpos($path, $this->root) === 0) { |
|
| 592 | return ltrim(substr($path, strlen($this->root)), $this->separator); |
|
| 593 | } else { |
|
| 594 | // for link |
|
| 595 | return $path; |
|
| 596 | } |
|
| 597 | } |
|
| 598 | } |
|
| 599 | ||
| 600 | /** |
|
| 601 | * Convert path related to root dir into real path |
|
| @@ 336-347 (lines=12) @@ | ||
| 333 | * @return string |
|
| 334 | * @author Dmitry (dio) Levashov |
|
| 335 | **/ |
|
| 336 | protected function _relpath($path) { |
|
| 337 | if ($path === $this->root) { |
|
| 338 | return ''; |
|
| 339 | } else { |
|
| 340 | if (strpos($path, $this->root) === 0) { |
|
| 341 | return ltrim(substr($path, strlen($this->root)), DIRECTORY_SEPARATOR); |
|
| 342 | } else { |
|
| 343 | // for link |
|
| 344 | return $path; |
|
| 345 | } |
|
| 346 | } |
|
| 347 | } |
|
| 348 | ||
| 349 | /** |
|
| 350 | * Convert path related to root dir into real path |
|