Sets template directories.

@param templateDirs
directories where templates are stored.
@return this instance.
348843
public OptionsBuilder templateDirs(File... templateDirs) {
        for (File templateDir : templateDirs) {
            this.options.setTemplateDirs(templateDir.getAbsolutePath());
        }
        return this;
    }
1218309
public function setTemplate($template, array $template_variables = [])
	{
		$this->template = $template;
		$this->template_variables = $template_variables;

		return $this;
	}
1364131
def get_template_dirs():
    """"""
    temp_glob = rel_to_cwd('templates', '**', 'templates', 'config.yaml')
    temp_groups = glob(temp_glob)
    temp_groups = [get_parent_dir(path, 2) for path in temp_groups]
    return set(temp_groups)
1148734
public boolean populateSourceDir(String templateDir, String srcDir)
    {
        URL fromDirUrl = this.getTask().getApplication().getResourceURL(templateDir, null);
        if ("http".equalsIgnoreCase(fromDirUrl.getProtocol()))
        {
            String packageName = templateDir + "/main_tourgeek_user/org/jbundle/main/user/db";
            packageName = packageName.replace('/', '.');
            Bundle bundle = (Bundle)ClassServiceUtility.getClassService().getClassFinder(null).findBundle(null, null, packageName, null);
            if (bundle == null) {
                Object resource = ClassServiceUtility.getClassService().getClassFinder(null).deployThisResource(packageName, null, true);
                if (resource != null)
                    bundle = (Bundle)ClassServiceUtility.getClassService().getClassFinder(null).findBundle(resource, null, packageName, null);
            }
        
            if (bundle == null)
                return false;   // Couldn't file files
            OsgiWebStartServlet.transferBundleFiles(bundle, templateDir, srcDir);
        }
        else if (!"file".equalsIgnoreCase(fromDirUrl.getProtocol()))
            return false;
        String fromDir = fromDirUrl.getFile();
        File fromDirFile = new File(fromDir);
        File srcDirFile = new File(srcDir);
        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("extension", "xml");
        properties.put("filter", ".*");   // Hack (filter is a bad name since it it used in many places)
        if (srcDirFile.exists())
        {
            long srcModified = srcDirFile.lastModified();
            long fromModified = fromDirFile.lastModified();
            if (srcModified > fromModified)
                return true;    // It's already set up and current!
            // Delete the directory so I can replace it with new data
            properties.put("sourceDir", srcDir);
            properties.put("destDir", srcDir);
            properties.put("listenerClass", DeleteScanListener.class.getName());
            properties.put("deleteDir", DBConstants.TRUE);
            BaseProcess process = new ConvertCode(this.getTask(), null, properties);
            process.run();
            process.free();
        }
        properties.put("sourceDir", fromDir);
        properties.put("destDir", srcDir);
        properties.put("listenerClass", BaseScanListener.class.getName());
        BaseProcess process = new ConvertCode(this.getTask(), null, properties);
        process.run();
        process.free();
        return true;
    }
294554
public static void init(String templateDir, String charset, Map<String, Object> initedGlobalContext) {
		globalContext.putAll(initedGlobalContext);
		init(templateDir, charset);
	}
120745
public EmbeddedGobblin setTemplate(String templateURI) throws URISyntaxException, SpecNotFoundException,
                                                        JobTemplate.TemplateException {
    return setTemplate(new PackagedTemplatesJobCatalogDecorator().getTemplate(new URI(templateURI)));
  }
496611
public Context setTemplate(Template template) {
        checkThread();
        if (template != null) {
            setEngine(template.getEngine());
        }
        this.template = template;
        return this;
    }
648148
def add_template_dirs(app):
    
    template_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')

    app.jinja_loader = jinja2.ChoiceLoader(
        [app.jinja_loader, jinja2.FileSystemLoader(template_dir)]
    )
1054360
public function setTemplateDir(string $templateDir): self
    {
        $this->templateDir = rtrim($templateDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
        $this->logger->debug("Template directory set to loader." , ["templateDir" => $this->templateDir]);
        return $this;
    }
1226262
public static GroupTemplate createFileGroupTemplate(String dir, Charset charset) {
		return createGroupTemplate(new FileResourceLoader(dir, charset.name()));
	}
93055
public function setTemplateDir($templatesDirectory)
    {
        if ($templatesDirectory && !in_array($templatesDirectory, $this->_aTemplateDir)) {
            $this->_aTemplateDir[] = $templatesDirectory;
        }
    }
50905
public void setAssessmentTemplates(java.util.Collection<AssessmentTemplate> assessmentTemplates) {
        if (assessmentTemplates == null) {
            this.assessmentTemplates = null;
            return;
        }

        this.assessmentTemplates = new java.util.ArrayList<AssessmentTemplate>(assessmentTemplates);
    }
1280665
public PutIntegrationResponseRequest withResponseTemplates(java.util.Map<String, String> responseTemplates) {
        setResponseTemplates(responseTemplates);
        return this;
    }
253523
def get_template_directory(self):
        
        dir = os.path.join(os.path.dirname(__file__), 'templates')
        return dir
10794
public function setTemplateMap(array $templateMap)
    {
        $this->templateMap = [];
        foreach ($templateMap as $name => $filename) {
            $this->addTemplate($name, $filename);
        }
    }
309407
public function setTemplateDir($templateDir)
    {
        $this->smarty->setTemplateDir($templateDir);
        if (!$this->getTemplateDir()) {
            throw new SmartyException("The template dir '" . $templateDir . "' does not exist.");
        }
    }
399749
function getCombinedTemplateDirectory(templateDirectories) {
    // Automatically track and clean up files at exit.
    temp.track();

    // Create a temporary directory to hold our template files.
    var combinedTemplateDirectory = temp.mkdirSync('templates');

    // Copy templates from our source directories into the combined directory.
    templateDirectories.reverse().forEach(function(templateDirectory) {
      grunt.file.expand(path.join(templateDirectory, '*.html')).forEach(function(srcPath) {
        var srcFilename = path.basename(srcPath),
            destPath = path.join(combinedTemplateDirectory, srcFilename);
        grunt.file.copy(srcPath, destPath);
      });
    });

    return combinedTemplateDirectory;
  }