Package org.omegat.core.data
Class ProjectProperties.ProjectPath
java.lang.Object
org.omegat.core.data.ProjectProperties.ProjectPath
- Enclosing class:
- ProjectProperties
Class for support project path functionality, like relative path, etc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns path relative to project root with '/' at the end for directories, or null if directory outside of project.booleanvoidsetRelativeOrAbsolute(String path) path is directory(or file) as declared in the omegat.project, but not __DEFAULT__.
-
Constructor Details
-
ProjectPath
public ProjectPath(boolean isDirectory) - Parameters:
isDirectory- true if directory(i.e. should be ended by '/'), false if file
-
-
Method Details
-
setRelativeOrAbsolute
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
-
getAsString
-
isUnderRoot
public boolean isUnderRoot() -
getUnderRoot
Returns path relative to project root with '/' at the end for directories, or null if directory outside of project.
-