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 gitconfig 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, setPlatformChecker
public java.lang.String getenv(java.lang.String variable)
SystemReader
getenv
in class SystemReader
variable
- system variable to readpublic java.lang.String getProperty(java.lang.String key)
SystemReader
getProperty
in class SystemReader
key
- of the system property to readpublic FileBasedConfig openSystemConfig(Config parent, FS fs)
SystemReader
openSystemConfig
in class SystemReader
parent
- 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)
SystemReader
openUserConfig
in class SystemReader
parent
- 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()
SystemReader
getHostname
in class SystemReader
public long getCurrentTime()
SystemReader
getCurrentTime
in class SystemReader
public int getTimezone(long when)
SystemReader
getTimezone
in class SystemReader
when
- a system timestamp