Constructor and Description |
---|
UnixPlatform()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
getGetenvArgs(java.lang.String varname)
Returns an array of words to pass to
Runtime.exec(java.lang.String[]) in order
to read an environment variable name. |
java.io.File |
getHomeDirectory()
Returns SAMP's definition of the "home" directory.
|
protected java.lang.String[] |
getPrivateReadArgs(java.io.File file)
Returns an array of words to pass to
Runtime.exec(java.lang.String[]) in order
to set permissions on a given file so that it cannot be read by
anyone other than its owner. |
getEnv, getPlatform, setPrivateRead
public java.io.File getHomeDirectory()
Platform
getHomeDirectory
in class Platform
protected java.lang.String[] getGetenvArgs(java.lang.String varname)
Platform
Runtime.exec(java.lang.String[])
in order
to read an environment variable name.
If null is returned, no way is known to do this with a system command.getGetenvArgs
in class Platform
varname
- environment variable name to readprotected java.lang.String[] getPrivateReadArgs(java.io.File file)
Platform
Runtime.exec(java.lang.String[])
in order
to set permissions on a given file so that it cannot be read by
anyone other than its owner.
If null is returned, no way is known to do this with a system command.getPrivateReadArgs
in class Platform
file
- file to alter