public function deleteFile($fileName) {
        $files = $this->getFiles();
        $success = false;
        foreach ($files as $file) {
            if($file->getRelativePathname() === $fileName){
                if(!$file->isWritable()){
                    throw new RuntimeException(sprintf("The file '%s' is not writable and can not be deleted.",$fileName));
                }
                unlink($file->getRealPath());
                if($file->isReadable()){
                    throw new RuntimeException(sprintf("The file '%s' could not be deleted",$fileName));
                }
                $success = true;
            }
        }
        return $success;
    }
public function deleteFile($fileName) {
        $files = $this->getFiles();
        $success = false;
        foreach ($files as $file) {
            if($file->getRelativePathname() === $fileName){
                if(!$file->isWritable()){
                    throw new RuntimeException(sprintf("The file '%s' is not writable and can not be deleted.",$fileName));
                }
                unlink($file->getRealPath());
                if($file->isReadable()){
                    throw new RuntimeException(sprintf("The file '%s' could not be deleted",$fileName));
                }
                $success = true;
            }
        }
        return $success;
    }
public function deleteFile ( $ fileName ) { $ files = $ this -> getFiles ( ) ; $ success = false ; foreach ( $ files as $ file ) { if ( $ file -> getRelativePathname ( ) === $ fileName ) { if ( ! $ file -> isWritable ( ) ) { throw new RuntimeException ( sprintf ( "The file '%s' is not writable and can not be deleted." , $ fileName ) ) ; } unlink ( $ file -> getRealPath ( ) ) ; if ( $ file -> isReadable ( ) ) { throw new RuntimeException ( sprintf ( "The file '%s' could not be deleted" , $ fileName ) ) ; } $ success = true ; } } return $ success ; }
Elimina un archivo dentro del modulo con su nombre
@param type $fileName
@throws RuntimeException
Elimina un archivo dentro del modulo con su nombre