Tabnine Logo
FileObject.getPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getPath
method
in
org.tinygroup.vfs.FileObject

Best Java code snippets using org.tinygroup.vfs.FileObject.getPath (Showing top 20 results out of 396)

origin: org.tinygroup/org.tinygroup.annotation

private String getFilePath(FileObject fileObject) {
  String path = fileObject.getPath();
  return path.substring(0, path.length() - CLASS_SUFFIX_LENGTH);
}
origin: org.tinygroup/annotation

private String getFilePath(FileObject fileObject) {
  String path = fileObject.getPath();
  return path.substring(0, path.length() - CLASS_SUFFIX_LENGTH);
}
origin: org.tinygroup/org.tinygroup.velocity

public void addMacroFile(FileObject macroFile) {
  macroList.add(macroFile.getPath());
  fullContextFileRepository.addFileObject(macroFile.getPath(), macroFile);
}
origin: org.tinygroup/org.tinygroup.velocity

public void removeMacroFile(FileObject macroFile) {
  macroList.remove(macroFile.getPath());
  fullContextFileRepository.removeFileObject(macroFile.getPath());
}
origin: org.tinygroup/org.tinygroup.fileresolver

private void process(FileObject fileObject) {
  fullContextFileRepository.addFileObject(fileObject.getPath(),
      fileObject);
}
origin: org.tinygroup/fileresolver

private void process(FileObject fileObject) {
  fullContextFileRepository.addFileObject(fileObject.getPath(),
      fileObject);
}
origin: org.tinygroup/org.tinygroup.docgen

public void generate(FileObject fileObject, Context context, OutputStream writer) {
  try {
    Template template = templateGenerater.findTemplate(fileObject.getPath());
    generate(template, context, writer);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
origin: org.tinygroup/org.tinygroup.docgen

public void removeMacroFile(FileObject fileObject) {
  try {
    fileResourceManager.removeResource(fileObject);
    templateGenerater.removeTemplate(fileObject.getPath());
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
origin: org.tinygroup/velocity

private String findTemplatePath(String path) throws FileNotFoundException {
  FileObject fileObject = fullContextFileRepository
      .getFileObjectDetectLocale(path);
  if (fileObject != null && fileObject.isExist()) {
    return fileObject.getPath();
  } else {
    int lastIndexSlash = path.lastIndexOf('/');
    return getDefaultTemplatePath(path.substring(0, lastIndexSlash));
  }
}
origin: org.tinygroup/org.tinygroup.fileresolver

public FileObject getFileObjectDetectLocale(String path) {
  StringBuilder sb = new StringBuilder();
  sb.append(path.substring(0, path.lastIndexOf('.')));
  sb.append(".");
  String locale = LocaleUtil.getContext().getLocale().toString();
  sb.append(locale);
  sb.append(path.substring(path.lastIndexOf('.')));
  FileObject fileObject = getFileObject(sb.toString());
  if (fileObject != null && fileObject.isExist()) {
    LOGGER.logMessage(LogLevel.DEBUG, "找到并使用[{}]的[{}]语言文件:{}", path, locale, fileObject.getPath());
    return fileObject;
  }
  return getFileObject(path);
}
origin: org.tinygroup/org.tinygroup.velocity

private String findTemplatePath(String path) throws FileNotFoundException {
  FileObject fileObject = fullContextFileRepository
      .getFileObjectDetectLocale(path);
  if (fileObject != null && fileObject.isExist()) {
    return fileObject.getPath();
  } else {
    int lastIndexSlash = path.lastIndexOf('/');
    return getDefaultTemplatePath(path.substring(0, lastIndexSlash));
  }
}
origin: org.tinygroup/org.tinygroup.springutil

public void regSpringConfigXml(List<FileObject> files) {
  for (FileObject fileObject : files) {
    LOGGER.logMessage(LogLevel.INFO, "添加文件:{}", fileObject.getPath());
    String urlString = fileObject.getURL().toString();
    addUrl(urlString);
  }
}
origin: org.tinygroup/org.tinygroup.springutil

public void regSpringConfigXml(List<FileObject> files) {
  for (FileObject fileObject : files) {
    LOGGER.logMessage(LogLevel.INFO, "添加文件:{}", fileObject.getPath());
    String urlString = fileObject.getURL().toString();
    addUrl(urlString);
  }
}
origin: org.tinygroup/org.tinygroup.tinyscriptbase

private static FileObject findFileObject(FileObject fileObject, String path) {
  if (fileObject.getPath().equals(path)) {
    return fileObject;
  }
  if (fileObject.getChildren() != null) {
    for (FileObject child : fileObject.getChildren()) {
      FileObject result = findFileObject(child, path);
      if (result != null) {
        return result;
      }
    }
  }
  return null;
}
origin: org.tinygroup/org.tinygroup.fileresolver

private void removeFile(FileObject fileObject) {
  fileObjectCaches.remove(fileObject.getPath());
  for (FileProcessor fileProcessor : fileProcessorList) {
    if (fileProcessor.isMatch(fileObject)) {// 匹配后才能删除
      fileProcessor.delete(fileObject);
    }
  }
  if (fileObject.getChildren() != null) {
    for (FileObject child : fileObject.getChildren()) {
      removeFile(child);
    }
  }
}
origin: org.tinygroup/org.tinygroup.templateengine

private Template loadTemplate(FileObject fileObject) throws TemplateException {
  try {
    Template templateFromContext = TemplateLoadUtil.loadComponent((TemplateEngineDefault) getTemplateEngine(), fileObject.getPath(), fileObject.getAbsolutePath(), fileObject.getLastModifiedTime(), getResourceContent(fileObject.getPath(), getTemplateEngine().getEncode()));
    addTemplate(templateFromContext);
    return templateFromContext;
  } catch (Exception e) {
    throw new TemplateException(e);
  }
}
origin: org.tinygroup/org.tinygroup.templateengine

  public static Template loadComponent(TemplateEngineDefault engine, FileObject fileObject) throws Exception {
    InputStream inputStream = fileObject.getInputStream();
    try {
      String content = IOUtils.readFromInputStream(inputStream, engine.getEncode());
      return loadComponent(engine, fileObject.getPath(), fileObject.getAbsolutePath(), fileObject.getLastModifiedTime(), content);
    } finally {
      if (inputStream != null) {
        inputStream.close();
      }
    }

  }
}
origin: org.tinygroup/weblayer

public void addConfig(FileObject fileObject) {
  String filePath = fileObject.getPath();
  logger.logMessage(INFO, "正在加载tiny-filter处理器配置文件[{0}] ....", filePath);
  try {
    String content = FileUtil.readStreamContent(fileObject.getInputStream(), "UTF-8");
    logger.logMessage(INFO, "tiny-filter处理器配置文件<{0}>加载完成。.", filePath);
    XmlNode root = new XmlStringParser().parse(content).getRoot();
    configs.add(root);
  } catch (Exception e) {
    logger.errorMessage("载入tiny-filter配置文件<{}>时发生异常", e, filePath);
    throw new RuntimeException(e);
  }
}
origin: org.tinygroup/org.tinygroup.fileresolver

private void addFileObject(FileObject fileObject) {
  if (fileObject.isFolder()) {
    if (fileObject.getChildren() != null) {
      for (FileObject child : fileObject.getChildren()) {
        addFileObject(child);
      }
    }
  } else {
    addFileObject(fileObject.getPath(), fileObject);
  }
}
origin: org.tinygroup/fileresolver

private void addFileObject(FileObject fileObject) {
  if (fileObject.isFolder()) {
    if (fileObject.getChildren() != null) {
      for (FileObject child : fileObject.getChildren()) {
        addFileObject(child);
      }
    }
  } else {
    addFileObject(fileObject.getPath(), fileObject);
  }
}
org.tinygroup.vfsFileObjectgetPath

Popular methods of FileObject

  • getInputStream
  • getFileName
  • getAbsolutePath
  • isExist
  • getLastModifiedTime
  • getExtName
  • foreach
  • getChildren
  • getURL
  • isFolder
  • clean
  • getSize
  • clean,
  • getSize,
  • isInPackage,
  • getChild,
  • getFileObject,
  • getOutputStream,
  • getParent,
  • getSchemaProvider,
  • isModified

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now