|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.lib.Config
org.eclipse.jgit.lib.FileBasedConfig
public class FileBasedConfig
The configuration file that is stored in the file of the file system.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jgit.lib.Config |
|---|
Config.SectionParser<T> |
| Constructor Summary | |
|---|---|
FileBasedConfig(Config base,
java.io.File cfgLocation)
The constructor |
|
FileBasedConfig(java.io.File cfgLocation)
Create a configuration with no default fallback. |
|
| Method Summary | |
|---|---|
java.io.File |
getFile()
|
void |
load()
Load the configuration as a Git text style configuration file. |
void |
save()
Save the configuration as a Git text style configuration file. |
java.lang.String |
toString()
|
| Methods inherited from class org.eclipse.jgit.lib.Config |
|---|
clear, fromText, get, getBoolean, getBoolean, getInt, getInt, getLong, getString, getStringList, getSubsections, setBoolean, setInt, setLong, setString, setStringList, toText, uncache, unset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileBasedConfig(java.io.File cfgLocation)
cfgLocation - the location of the configuration file on the file system
public FileBasedConfig(Config base,
java.io.File cfgLocation)
base - the base configuration filecfgLocation - the location of the configuration file on the file system| Method Detail |
|---|
public final java.io.File getFile()
public void load()
throws java.io.IOException,
ConfigInvalidException
If the file does not exist, this configuration is cleared, and thus behaves the same as though the file exists, but is empty.
java.io.IOException - the file could not be read (but does exist).
ConfigInvalidException - the file is not a properly formatted configuration file.
public void save()
throws java.io.IOException
Warning: Although this method uses the traditional Git file locking approach to protect against concurrent writes of the configuration file, it does not ensure that the file has not been modified since the last read, which means updates performed by other objects accessing the same backing file may be lost.
java.io.IOException - the file could not be written.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||