| | |
| | | } |
| | | |
| | | function remove_blank_lines($input, $file = 1){ |
| | | //Leerzeilen löschen |
| | | //Leerzeilen löschen |
| | | if($file){ |
| | | $content = $this->unix_nl($this->rf($input)); |
| | | } else { |
| | |
| | | } |
| | | return $passed; |
| | | } |
| | | |
| | | function removeDirectory($dir){ |
| | | //TODO: implement something to delete files/directories recursively that are owned by a certain user or group |
| | | if(is_dir($dir)){ |
| | | $files = array_diff(scandir($dir), array('.','..')); |
| | | if(is_array($files) && !empty($files)){ |
| | | foreach($files as $file){ |
| | | if(is_dir($dir.'/'.$file)){ |
| | | $this->removeDirectory($dir.'/'.$file); |
| | | } else { |
| | | @unlink($dir.'/'.$file); |
| | | } |
| | | } |
| | | } |
| | | @rmdir($dir); |
| | | } |
| | | } |
| | | |
| | | } |
| | | ?> |