private static class SystemReader.Default extends SystemReader
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
hostname |
| Modifier | Constructor and Description |
|---|---|
private |
Default() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCurrentTime()
Get the current system time
|
java.lang.String |
getenv(java.lang.String variable)
Get value of the system variable
|
java.lang.String |
getHostname()
Gets the hostname of the local host.
|
java.lang.String |
getProperty(java.lang.String key)
Get value of the system property
|
int |
getTimezone(long when)
Get the local time zone
|
FileBasedConfig |
openSystemConfig(Config parent,
FS fs)
Open the gitonfig configuration found in the system-wide "etc" directory
|
FileBasedConfig |
openUserConfig(Config parent,
FS fs)
Open the git configuration found in the user home
|
checkPath, checkPath, getClock, getDateTimeInstance, getInstance, getLocale, getSimpleDateFormat, getSimpleDateFormat, getTimeZone, isMacOS, isWindows, setInstance, setPlatformCheckerpublic java.lang.String getenv(java.lang.String variable)
SystemReadergetenv in class SystemReadervariable - system variable to readpublic java.lang.String getProperty(java.lang.String key)
SystemReadergetProperty in class SystemReaderkey - of the system property to readpublic FileBasedConfig openSystemConfig(Config parent, FS fs)
SystemReaderopenSystemConfig in class SystemReaderparent - a config with values not found directly in the returned
config. Null is a reasonable value here.fs - the file system abstraction which will be necessary to perform
certain file system operations.public FileBasedConfig openUserConfig(Config parent, FS fs)
SystemReaderopenUserConfig in class SystemReaderparent - a config with values not found directly in the returned configfs - the file system abstraction which will be necessary to perform
certain file system operations.public java.lang.String getHostname()
SystemReadergetHostname in class SystemReaderpublic long getCurrentTime()
SystemReadergetCurrentTime in class SystemReaderpublic int getTimezone(long when)
SystemReadergetTimezone in class SystemReaderwhen - a system timestamp