| @@ 774-786 (lines=13) @@ | ||
| 771 | return is_writable($location); |
|
| 772 | } |
|
| 773 | ||
| 774 | function rmdir($dir) { |
|
| 775 | foreach ( scandir($dir) as $file ) { |
|
| 776 | if ( !in_array($file, array('.', '..')) ) { |
|
| 777 | if ( is_dir($dir . '/' . $file) ) { |
|
| 778 | $this->rmdir($dir . '/' . $file); |
|
| 779 | } else { |
|
| 780 | unlink($dir . '/' . $file); |
|
| 781 | } |
|
| 782 | } |
|
| 783 | } |
|
| 784 | ||
| 785 | return rmdir($dir); |
|
| 786 | } |
|
| 787 | ||
| 788 | function displayPath($pathname) { |
|
| 789 | if ( DIRECTORY_SEPARATOR == '/' ) { |
|
| @@ 828-840 (lines=13) @@ | ||
| 825 | return is_writable($location); |
|
| 826 | } |
|
| 827 | ||
| 828 | function rmdir($dir) { |
|
| 829 | foreach ( scandir($dir) as $file ) { |
|
| 830 | if ( !in_array($file, array('.', '..')) ) { |
|
| 831 | if ( is_dir($dir . '/' . $file) ) { |
|
| 832 | $this->rmdir($dir . '/' . $file); |
|
| 833 | } else { |
|
| 834 | unlink($dir . '/' . $file); |
|
| 835 | } |
|
| 836 | } |
|
| 837 | } |
|
| 838 | ||
| 839 | return rmdir($dir); |
|
| 840 | } |
|
| 841 | ||
| 842 | function displayPath($pathname) { |
|
| 843 | if ( DIRECTORY_SEPARATOR == '/' ) { |
|