Get the source file relative to the root source directory for the given
template.

@param name The fully-qualified name of the template

@return The file reference to the source file
166719
protected File getSourceFile(String name) {
        String fileName = name.replace('.', File.separatorChar) + ".tea";

        File file = new File(mRootSourceDir, fileName);
        return file;
    }
43545
protected function getFileName($name)
    {
        $name = (string) $name;

        try {
            $template = $this->parser->parse($name);
            $file     = $this->locator->locate($template);
        } catch (\Exception $e) {
            throw new \InvalidArgumentException(sprintf('Unable to find template "%s".', $name));
        }

        return $file;
    }
959187
public URL getResource(String name)
  {
    Path path;

    path = getPath(name);

    if (path != null && path.exists()) {
      try {
        return path.getNetURL();
      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);
      }
    }

    return null;
  }
1209150
public function getSource($name)
    {
        $this->getFileOrFail($name);

        return $this->filesystem->read($this->resolveTemplateName($name));
    }
245394
public String getSourceFile() {
        if ( sourceFile == null )
            if ( parent != null )
                return ((SimpleNode)parent).getSourceFile();
            else
                return "<unknown file>";
        else
            return sourceFile;
    }
491672
public VDirectory getDirectoryCreate(String name) {
		VDirectory child = new VDirectory(this, name);
		child.create();
		return child;
	}
141802
@Override
    public File locateResource( String name ) {
        for (int i = 0; i < resourcePath.length; i++) {
            File fi = new File(resourcePath[i].getAbsolutePath()+File.separator+name);
            if ( fi.exists() )
                return fi;
        }
        return null;
    }
346411
private function getTemplateFile($name)
    {
        return Request::get('system.root').$this->config['path'].(isset($this->config['module']) ? $this->config['module'] : '').'/'.$name.$this->config['suffix'];
    }
894832
@Nullable
  public DirectoryEntry getRoot(Name name) {
    Directory dir = roots.get(name);
    return dir == null ? null : dir.entryInParent();
  }
36307
function getTemplate(template) {
  var ret;

  store.roots.some(function(r) {
    var filepath = path.join(r, template);
    if (file.exists(filepath)) {
      ret = filepath;
      return true;
    }
  });

  return ret;
}
196566
public static String getFilenameExtension(String name) {
    if(name == null) {
      return null;
    }
    int index = name.lastIndexOf('.');
    return index < 0 ? null : name.substring(index + 1).toLowerCase();
  }
387879
public static FileOrder fromName(final String name) {
        if (name == null) {
            return null;
        }
        for (final FileOrder fo : INSTANCES) {
            if (fo.name.equals(name)) {
                return fo;
            }
        }
        throw new IllegalArgumentException("Unknown name: " + name);
    }
622157
def get_host_template(self, name):
    
    return host_templates.get_host_template(self._get_resource_root(), name, self.name)
921293
public Template getTemplate(final String name) throws ResourceNotFoundException {
        final Template template = this.cachedTemplates.get(name);
        if (template != null) {
            return template;
        }
        return createTemplateIfAbsent(name);
    }
1344207
public static Template getFileTemplate(String dir, String templateFileName) {
		return getTemplate(createFileGroupTemplate(dir), templateFileName);
	}
707774
private File getTemplateFile(String filename) throws IOException {
        File templateFile=null;
        final String resource = TEMPLATE_RESOURCES_PATH + "/" + filename;
        InputStream is = Setup.class.getClassLoader().getResourceAsStream(resource);
        if (null == is) {
            throw new RuntimeException("Unable to load required template: " + resource);
        }
        templateFile = File.createTempFile("temp", filename);
        templateFile.deleteOnExit();
        try {
            return copyToNativeLineEndings(is, templateFile);
        } finally {
            is.close();
        }
    }
534904
public function getSource($name)
	{
		if (strpos($name, ':') === false) {
			throw new \Exception(
				sprintf('Oops, template file name does not seem to be in Package:file\name\path.html.twig format ("%s" given")', $name)
			);
		}

		list($packageName, $templatePath) = explode(':', $name);

		$path = $this->container->getApplication()->locateViewFile($packageName, $templatePath);

		return file_get_contents($path);
	}