@@ 927-951 (lines=25) @@ | ||
924 | * @return bool |
|
925 | * @author Dmitry (dio) Levashov |
|
926 | **/ |
|
927 | protected function _findSymlinks($path) { |
|
928 | die('Not yet implemented. (_findSymlinks)'); |
|
929 | if (is_link($path)) { |
|
930 | return true; |
|
931 | } |
|
932 | if (is_dir($path)) { |
|
933 | foreach (scandir($path) as $name) { |
|
934 | if ($name != '.' && $name != '..') { |
|
935 | $p = $path.DIRECTORY_SEPARATOR.$name; |
|
936 | if (is_link($p)) { |
|
937 | return true; |
|
938 | } |
|
939 | if (is_dir($p) && $this->_findSymlinks($p)) { |
|
940 | return true; |
|
941 | } elseif (is_file($p)) { |
|
942 | $this->archiveSize += filesize($p); |
|
943 | } |
|
944 | } |
|
945 | } |
|
946 | } else { |
|
947 | $this->archiveSize += filesize($path); |
|
948 | } |
|
949 | ||
950 | return false; |
|
951 | } |
|
952 | ||
953 | /** |
|
954 | * Extract files from archive |
@@ 616-641 (lines=26) @@ | ||
613 | * @return bool |
|
614 | * @author Dmitry (dio) Levashov |
|
615 | **/ |
|
616 | protected function _findSymlinks($path) { |
|
617 | if (is_link($path)) { |
|
618 | return true; |
|
619 | } |
|
620 | ||
621 | if (is_dir($path)) { |
|
622 | foreach (scandir($path) as $name) { |
|
623 | if ($name != '.' && $name != '..') { |
|
624 | $p = $path.DIRECTORY_SEPARATOR.$name; |
|
625 | if (is_link($p) || !$this->nameAccepted($name)) { |
|
626 | return true; |
|
627 | } |
|
628 | if (is_dir($p) && $this->_findSymlinks($p)) { |
|
629 | return true; |
|
630 | } elseif (is_file($p)) { |
|
631 | $this->archiveSize += filesize($p); |
|
632 | } |
|
633 | } |
|
634 | } |
|
635 | } else { |
|
636 | ||
637 | $this->archiveSize += filesize($path); |
|
638 | } |
|
639 | ||
640 | return false; |
|
641 | } |
|
642 | ||
643 | /** |
|
644 | * Extract files from archive |