@@ 689-701 (lines=13) @@ | ||
686 | * @return string |
|
687 | * @author Dmitry (dio) Levashov |
|
688 | **/ |
|
689 | protected function _relpath($path) |
|
690 | { |
|
691 | if ($path === $this->root) { |
|
692 | return ''; |
|
693 | } else { |
|
694 | if (strpos($path, $this->root) === 0) { |
|
695 | return ltrim(substr($path, strlen($this->root)), $this->separator); |
|
696 | } else { |
|
697 | // for link |
|
698 | return $path; |
|
699 | } |
|
700 | } |
|
701 | } |
|
702 | ||
703 | /** |
|
704 | * Convert path related to root dir into real path. |
@@ 390-402 (lines=13) @@ | ||
387 | * @return string |
|
388 | * @author Dmitry (dio) Levashov |
|
389 | **/ |
|
390 | protected function _relpath($path) |
|
391 | { |
|
392 | if ($path === $this->root) { |
|
393 | return ''; |
|
394 | } else { |
|
395 | if (strpos($path, $this->root) === 0) { |
|
396 | return ltrim(substr($path, strlen($this->root)), DIRECTORY_SEPARATOR); |
|
397 | } else { |
|
398 | // for link |
|
399 | return $path; |
|
400 | } |
|
401 | } |
|
402 | } |
|
403 | ||
404 | /** |
|
405 | * Convert path related to root dir into real path. |