public final class ProjectFileStorage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_FOLDER_MARKER
A marker that tells OmegaT that project's subfolder has default location.
|
Modifier and Type | Method and Description |
---|---|
static ProjectProperties |
loadProjectProperties(java.io.File projectDir)
Load the project properties file for the project at the specified directory.
|
static ProjectProperties |
loadPropertiesFile(java.io.File projectDir,
java.io.File projectFile)
Load the specified project properties file for the project at the specified directory.
|
static Omegat |
parseProjectFile(byte[] projectFile) |
static Omegat |
parseProjectFile(java.io.File file) |
static void |
writeProjectFile(ProjectProperties props)
Saves project file to disk.
|
public static final java.lang.String DEFAULT_FOLDER_MARKER
public static Omegat parseProjectFile(java.io.File file) throws java.lang.Exception
java.lang.Exception
public static Omegat parseProjectFile(byte[] projectFile) throws java.lang.Exception
java.lang.Exception
public static ProjectProperties loadProjectProperties(java.io.File projectDir) throws java.lang.Exception
OConsts.FILE_PROJECT
.
This is a convenience method for loadPropertiesFile(File, File)
.
If the supplied File
is not a directory, an IllegalArgumentException
will be thrown.
projectDir
- The directory of the projectjava.lang.Exception
public static ProjectProperties loadPropertiesFile(java.io.File projectDir, java.io.File projectFile) throws java.lang.Exception
If projectDir
is not a directory or projectFile
is not a file, an
IllegalArgumentException
will be thrown.
projectDir
- The directory of the projectprojectFile
- The project properties file to loadjava.lang.Exception
public static void writeProjectFile(ProjectProperties props) throws java.lang.Exception
java.lang.Exception