Package org.omegat.core.data
Class ProjectProperties.ProjectPath
- java.lang.Object
-
- org.omegat.core.data.ProjectProperties.ProjectPath
-
- Enclosing class:
- ProjectProperties
public final class ProjectProperties.ProjectPath extends java.lang.Object
Class for support project path functionality, like relative path, etc.
-
-
Constructor Summary
Constructors Constructor Description ProjectPath(boolean isDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getAsFile()
java.lang.String
getAsString()
java.lang.String
getUnderRoot()
Returns path relative to project root with '/' at the end for directories, or null if directory outside of project.boolean
isUnderRoot()
void
setRelativeOrAbsolute(java.lang.String path)
path is directory(or file) as declared in the omegat.project, but not __DEFAULT__.
-
-
-
Method Detail
-
setRelativeOrAbsolute
public void setRelativeOrAbsolute(java.lang.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 java.io.File getAsFile()
-
getAsString
public java.lang.String getAsString()
-
isUnderRoot
public boolean isUnderRoot()
-
getUnderRoot
public java.lang.String getUnderRoot()
Returns path relative to project root with '/' at the end for directories, or null if directory outside of project.
-
-