@@ 770-786 (lines=17) @@ | ||
767 | return $def; |
|
768 | } |
|
769 | ||
770 | function getDirectoryContents($base, &$result = array()) { |
|
771 | foreach ( scandir($base) as $file ) { |
|
772 | if ( ($file == '.') || ($file == '..') ) { |
|
773 | continue; |
|
774 | } |
|
775 | ||
776 | $pathname = $base . '/' . $file; |
|
777 | ||
778 | if ( is_dir($pathname) ) { |
|
779 | $this->getDirectoryContents($pathname, $result); |
|
780 | } else { |
|
781 | $result[] = str_replace('\\', '/', $pathname); // Unix style directory separator "/" |
|
782 | } |
|
783 | } |
|
784 | ||
785 | return $result; |
|
786 | } |
|
787 | ||
788 | function isWritable($location) { |
|
789 | if ( !file_exists($location) ) { |
@@ 822-838 (lines=17) @@ | ||
819 | return $def; |
|
820 | } |
|
821 | ||
822 | function getDirectoryContents($base, &$result = array()) { |
|
823 | foreach ( scandir($base) as $file ) { |
|
824 | if ( ($file == '.') || ($file == '..') ) { |
|
825 | continue; |
|
826 | } |
|
827 | ||
828 | $pathname = $base . '/' . $file; |
|
829 | ||
830 | if ( is_dir($pathname) ) { |
|
831 | $this->getDirectoryContents($pathname, $result); |
|
832 | } else { |
|
833 | $result[] = str_replace('\\', '/', $pathname); // Unix style directory separator "/" |
|
834 | } |
|
835 | } |
|
836 | ||
837 | return $result; |
|
838 | } |
|
839 | ||
840 | function isWritable($location) { |
|
841 | if ( !file_exists($location) ) { |