Delete existing template
@param template template name
@throws IOException
356936
public JsonResponse deleteTemplate(String template) throws IOException {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put(Template.PARAM_TEMPLATE, template);
        return apiDelete(ApiAction.template, data);
    }
1100330
private void deleteDynamicTemplates() throws IOException {
        File codegenDir = new File(getProjectDir() + "/codegen");
        if (codegenDir.exists()) {
            getOut().println("Deleting " + codegenDir);
            new Delete(codegenDir, true).run();
        }
        File assetsDir = new File(getProjectDir() + "/assets");
        if (assetsDir.exists()) {
            getOut().println("Deleting " + assetsDir);
            new Delete(assetsDir, true).run();
        }
        File configuratorDir = new File(getProjectDir() + "/configurator");
        if (configuratorDir.exists()) {
            getOut().println("Deleting " + configuratorDir);
            new Delete(configuratorDir, true).run();
        }
    }
365466
public void updateDebugTemplate(String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
	if (!hasAccess) throw new SecurityException("no access to change debugging settings");

	Element debugging = _getRootElement("debugging");
	// if(template.trim().length()>0)
	debugging.setAttribute("template", template);
    }
725808
function(templates) {

		for (var i = 0, count = templates.length; i < count; i++) {

			this._remove_queue[templates[i].guid] = templates[i];

		}

	}
1218999
function(removed_templates) {

		for (var i = 0, removed_count = removed_templates.length; i < removed_count; i++) {

			removed_templates[i].destroy();

		}

	}
553909
public function onLoadComponentTemplate(Template $template, $fileName)
	{
		if (!$this->activeTheme) {
			return;
		}

		$path = $this->activeTheme->getPath() . 'templates' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . $fileName;
		if (file_exists($path)) {
			$template->setFile($path);
		} elseif ($parent = $this->activeTheme->getParent()) {
			$parentTheme = $this->getTheme($parent);
			$path = $parentTheme->getPath() . 'templates' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . $fileName;
			if (file_exists($path)) {
				$template->setFile($path);
			}
		}
	}
570943
public function onParseTemplate(Template $template): void
    {
        if (!$this->environment->isEnabled()) {
            return;
        }

        $this->initialize();
        if ($this->isAutoMappingDisabled($template->getName())) {
            return;
        }

        $templateName = $this->getMappedTemplateName($template->getName());
        if ($templateName) {
            $template->setName($templateName);
        }
    }
118768
public void delTemplateEntry(String template, Object entry) {
        if (htod.delTemplateEntry(template, entry) == HTODDynacache.DISK_EXCEPTION) {
            stopOnError(this.htod.diskCacheException);
        }
    }
1271316
public function destroy(TemplateRequest $request, $template)
    {
        $template = $request->template;
        $path = theme_path('views').$template;

        // Block and notify if file does not exist.
        if (! \File::exists($path)) {
            return $this->makeRedirect(false, 'admin.templates.index', sprintf(
                __('msg.not_exists'), $template
            ));
        }

        // Block if file not delete.
        if (! \File::delete($path)) {
            return $this->makeRedirect(false, 'admin.templates.index', sprintf(
                __('msg.not_deleted'), $template
            ));
        }
        
        return $this->makeRedirect(true, 'admin.templates.index', sprintf(
            __('msg.deleted'), $template
        ));
    }
94567
def delete_template(template_id,**kwargs):
    
    try:
        tmpl = db.DBSession.query(Template).filter(Template.id==template_id).one()
    except NoResultFound:
        raise ResourceNotFoundError("Template %s not found"%(template_id,))
    db.DBSession.delete(tmpl)
    db.DBSession.flush()
    return 'OK'
1020592
def delete_template(template_disk)
      Log.debug "deleting template #{template_disk}"
      template = File.join(@templates_dir, File.basename(template_disk))
      template_flat = File.join(@templates_dir, File.basename(template_disk, ".vmdk") + "-flat.vmdk")
      Net::SSH.start(@address, @user, :password => @password) do |ssh|
        if (ssh.exec! "ls #{template} 2>/dev/null").nil?
          Log.error "Template #{template_disk} does not exist"
          raise "Template does not exist"
        end
        ssh.exec!("rm -f #{template} && rm -f #{template_flat} 2>&1")
      end
    end
264266
private void generate(TemplateFile input, List<OutputFile> outputs, TemplateOptions templateOptions) throws IOException {
    final String targetFileName = targetFileName(templatesPath.relativize(input.path).toString(), templateOptions);
    final OutputFile output = new OutputFile(outputPath.resolve(targetFileName).toAbsolutePath().normalize());

    if (incremental &&
        Files.exists(output.path) &&
        Files.getLastModifiedTime(output.path).toMillis() >= Files.getLastModifiedTime(input.path).toMillis()) {
      // No need to re-render but mark as generated.
      output.upToDate = true;
      outputs.add(output);
      return;
    }

    String template = new String(Files.readAllBytes(input.path), StandardCharsets.UTF_8);

    timeVelocity.start();
    template = filterVelocity(input, template, templateOptions);
    timeVelocity.stop();

    // Check if template requested ignoring a given type combination.
    if (templateOptions.isIgnored()) {
      return;
    }

    getLog().debug("Processing: " + input.getFileName() + " => " + output.path);
    try {
      timeIntrinsics.start();
      template = filterIntrinsics(template, templateOptions);
      timeIntrinsics.stop();
  
      timeComments.start();
      template = filterComments(template);
      timeComments.stop();
  
      timeTypeClassRefs.start();
      template = filterTypeClassRefs(template, templateOptions);
      template = filterStaticTokens(template, templateOptions);
      timeTypeClassRefs.stop();
    } catch (RuntimeException e) {
      getLog().error("Error processing: " + input.getFileName() + " => " + output.path + ":\n\t" + e.getMessage());
      throw e;
    }

    Files.createDirectories(output.path.getParent());
    Files.write(output.path, template.getBytes(StandardCharsets.UTF_8));

    outputs.add(output);
  }
929371
public void registerTemplate(String name, ITemplate template) {
        if (null == template) throw new NullPointerException();
//        if (_templates.containsKey(name)) {
//            return false;
//        }
        _templates.put(name, template);
        return;
    }
732702
public void installationTemplate_templateName_DELETE(String templateName) throws IOException {
		String qPath = "/me/installationTemplate/{templateName}";
		StringBuilder sb = path(qPath, templateName);
		exec(qPath, "DELETE", sb.toString(), null);
	}
117148
def delete_host_template(resource_root, name, cluster_name):
  
  return call(resource_root.delete,
      HOST_TEMPLATE_PATH % (cluster_name, name),
      ApiHostTemplate, api_version=3)
618804
public void installationTemplate_templateName_partitionScheme_schemeName_DELETE(String templateName, String schemeName) throws IOException {
		String qPath = "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}";
		StringBuilder sb = path(qPath, templateName, schemeName);
		exec(qPath, "DELETE", sb.toString(), null);
	}
40057
public void templateModem_name_PUT(String name, OvhTemplateModem body) throws IOException {
		String qPath = "/xdsl/templateModem/{name}";
		StringBuilder sb = path(qPath, name);
		exec(qPath, "PUT", sb.toString(), body);
	}