@@ 742-758 (lines=17) @@ | ||
739 | return $def; |
|
740 | } |
|
741 | ||
742 | function getDirectoryContents($base, &$result = array()) { |
|
743 | foreach ( scandir($base) as $file ) { |
|
744 | if ( ($file == '.') || ($file == '..') ) { |
|
745 | continue; |
|
746 | } |
|
747 | ||
748 | $pathname = $base . '/' . $file; |
|
749 | ||
750 | if ( is_dir($pathname) ) { |
|
751 | $this->getDirectoryContents($pathname, $result); |
|
752 | } else { |
|
753 | $result[] = str_replace('\\', '/', $pathname); // Unix style directory separator "/" |
|
754 | } |
|
755 | } |
|
756 | ||
757 | return $result; |
|
758 | } |
|
759 | ||
760 | function isWritable($location) { |
|
761 | if ( !file_exists($location) ) { |
@@ 796-812 (lines=17) @@ | ||
793 | return $def; |
|
794 | } |
|
795 | ||
796 | function getDirectoryContents($base, &$result = array()) { |
|
797 | foreach ( scandir($base) as $file ) { |
|
798 | if ( ($file == '.') || ($file == '..') ) { |
|
799 | continue; |
|
800 | } |
|
801 | ||
802 | $pathname = $base . '/' . $file; |
|
803 | ||
804 | if ( is_dir($pathname) ) { |
|
805 | $this->getDirectoryContents($pathname, $result); |
|
806 | } else { |
|
807 | $result[] = str_replace('\\', '/', $pathname); // Unix style directory separator "/" |
|
808 | } |
|
809 | } |
|
810 | ||
811 | return $result; |
|
812 | } |
|
813 | ||
814 | function isWritable($location) { |
|
815 | if ( !file_exists($location) ) { |