DELETE /quotes/1
 DELETE /quotes/1.xml
503318
def destroy
      @quote = Cmtool::Quote.find(params[:id])
      @quote.destroy

      respond_to do |format|
        format.html { redirect_to(cmtool.quotes_url, notice: I18n.t('cmtool.action.destroy.successful', model: Cmtool::Quote.model_name.human)) }
        format.xml  { head :ok }
      end
    end
909148
def delete_website(directory)
      if File.exists? yaml_file(directory, website.title)
        FileUtils.rm(yaml_file(directory, website.title)) 
      end
    end
1090803
def cleanup(self):
        """"""
        shutil.rmtree(self.name, onerror=lambda *a: os.chmod(a[1], __import__('stat').S_IWRITE) or os.unlink(a[1]))
        if os.path.exists(self.name):
            raise IOError(17, "File exists: '{}'".format(self.name))
415823
private function deactivateQuote($quote)
    {
        $quoteId = $quote->getId();
        if ($this->sessCustomer->isLoggedIn()) {
            $this->daoWrhsQuote->deleteById($quoteId);
        } else {
            $quoteReg = $this->sessCustomer->getData(AQuoteRepo::SESS_QUOTE_REGISTRY);
            if (
                is_array($quoteReg) &&
                isset($quoteReg[$quoteId])
            ) {
                unset($quoteReg[$quoteId]);
                $this->sessCustomer->setData(AQuoteRepo::SESS_QUOTE_REGISTRY, $quoteReg);
            }
        }
    }
391078
public function delete_content() {
        global $CFG, $DB;

        blocks_delete_all_for_context($this->_id);
        filter_delete_all_for_context($this->_id);

        require_once($CFG->dirroot . '/comment/lib.php');
        comment::delete_comments(array('contextid'=>$this->_id));

        require_once($CFG->dirroot.'/rating/lib.php');
        $delopt = new stdclass();
        $delopt->contextid = $this->_id;
        $rm = new rating_manager();
        $rm->delete_ratings($delopt);

        // delete all files attached to this context
        $fs = get_file_storage();
        $fs->delete_area_files($this->_id);

        // Delete all repository instances attached to this context.
        require_once($CFG->dirroot . '/repository/lib.php');
        repository::delete_all_for_context($this->_id);

        // delete all advanced grading data attached to this context
        require_once($CFG->dirroot.'/grade/grading/lib.php');
        grading_manager::delete_all_for_context($this->_id);

        // now delete stuff from role related tables, role_unassign_all
        // and unenrol should be called earlier to do proper cleanup
        $DB->delete_records('role_assignments', array('contextid'=>$this->_id));
        $DB->delete_records('role_names', array('contextid'=>$this->_id));
        $this->delete_capabilities();
    }
856082
def delete_vhost(self, name):
        
        self._api_delete('/api/vhosts/{0}'.format(
            urllib.parse.quote_plus(name)
        ))
1017809
def clean():
        
        shutil.rmtree(BUILD_PATH, ignore_errors=True)
        shutil.rmtree(os.path.join(SOURCE_PATH, 'reference', 'api'),
                      ignore_errors=True)
360618
def cleanup():
        """"""
        for install_dir in linters.INSTALL_DIRS:
            try:
                shutil.rmtree(install_dir, ignore_errors=True)
            except Exception:
                print(
                    "{0}\nFailed to delete {1}".format(
                        traceback.format_exc(), install_dir
                    )
                )
                sys.stdout.flush()
151143
def remove_vuln_check(check_id)
      checks = REXML::XPath.first(@xml, '//VulnerabilityChecks')
      checks.elements.delete("Disabled/Check[@id='#{check_id}']")
      checks.elements.delete("Enabled/Check[@id='#{check_id}']")
    end
515971
def destroy
      @image = Cmtool::Image.find(params[:id])
      directory = @image.directory
      @image.destroy

      respond_to do |format|
        format.html { redirect_to([cmtool, directory || :images]) }
        format.xml  { head :ok }
      end
    end
1100281
void remove() {
        int nLen = length();
        for (int i = nLen - 1; i >= 0; i--) {
            XML xml = getXmlFromAnnotation(i);
            if (xml != null) {
                xml.remove();
                internalRemoveFromList(i);
            }
        }
    }
69453
def clean(self):
        
        if self._initialized:
            logger.info("brace yourselves, removing %r", self.path)
            shutil.rmtree(self.path)
1228446
def removeXmlElement(name, directory, file_pattern, logger=None):
    
    for path, dirs, files in os.walk(os.path.abspath(directory)):
        for filename in fnmatch.filter(files, file_pattern):
            filepath = os.path.join(path, filename)
            remove_xml_element_file(name, filepath)
569444
def delete_all( name )
      rv = []
      each_attribute { |attribute| 
        rv << attribute if attribute.expanded_name == name
      }
      rv.each{ |attr| attr.remove }
      return rv
    end
429116
def delete(connection)
      xml = %(<EnginePoolDeleteRequest session-id="#{connection.session_id}">)
      xml << %(<EnginePool name="#{@name}" scope="#{@scope}" />)
      xml << '</EnginePoolDeleteRequest>'

      r = connection.execute(xml, '1.2')
      r.success
    end
77438
def clean(self):
        ''''''

        for e in self.bucket.list(self.prefix):
            path = e.name.replace(self.prefix, '', 1).strip('/')
            if path.startswith('_'):
                continue

            self.remove(path)
668171
def destroy
      @news = Cmtool::News.find(params[:id])
      @news.destroy

      respond_to do |format|
        format.html { redirect_to(cmtool.news_index_url) }
        format.xml  { head :ok }
      end
    end