Class ProjectProperties.ProjectPath

java.lang.Object
org.omegat.core.data.ProjectProperties.ProjectPath
Enclosing class:
ProjectProperties

public final class ProjectProperties.ProjectPath extends Object
Class for support project path functionality, like relative path, etc.
  • Constructor Details

    • ProjectPath

      public ProjectPath(boolean isDirectory)
      Parameters:
      isDirectory - true if directory(i.e. should be ended by '/'), false if file
  • Method Details

    • setRelativeOrAbsolute

      public void setRelativeOrAbsolute(String path)
      path is directory(or file) as declared in the omegat.project, but not __DEFAULT__.

      i.e. caller can send something like "/some/project/source", or "source", or "source/".

      Absolute paths from Windows will be treated as relative on Linux/MacOS, and vice versa.

    • getAsFile

      public File getAsFile()
    • getAsString

      public String getAsString()
    • isUnderRoot

      public boolean isUnderRoot()
    • getUnderRoot

      public String getUnderRoot()
      Returns path relative to project root with '/' at the end for directories, or null if directory outside of project.