code: protected TemplateLoader getTemplateLoaderForPath(String templateLoaderPath) throws IOException {
          if (templateLoaderPath.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
              String basePackagePath = templateLoaderPath.substring(ResourceUtils.CLASSPATH_URL_PREFIX.length());
              if (log.isDebugEnabled()) {
                  log.debug("Template loader path [" + templateLoaderPath +
                          "] resolved to class path [" + basePackagePath + "]");
              }
              return new ClassTemplateLoader(environment.getClassLoader(), basePackagePath);
          } else if (templateLoaderPath.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
              File file = new File(templateLoaderPath.substring(ResourceUtils.FILE_URL_PREFIX.length()));
              if (log.isDebugEnabled()) {
                  log.debug("Template loader path [" + templateLoaderPath +
                          "] resolved to file path [" + file.getAbsolutePath() + "]");
              }
              return new FileTemplateLoader(file);
          } else {
              File file = new File(environment.getBasePath(), templateLoaderPath);
              if (log.isDebugEnabled()) {
                  log.debug("Template loader path [" + templateLoaderPath +
                          "] resolved to file path [" + file.getAbsolutePath() + "]");
              }
              return new FileTemplateLoader(file);
          }
      }
docs: Determine a FreeMarker TemplateLoader for the given path.
  
  @param templateLoaderPath the path to load templates from
  @return an appropriate TemplateLoader
  @throws IOException if an I/O error has occurred
  @see freemarker.cache.FileTemplateLoader