Package org.astrogrid.samp
Class Platform.UnixPlatform
- java.lang.Object
-
- org.astrogrid.samp.Platform
-
- org.astrogrid.samp.Platform.UnixPlatform
-
-
Constructor Summary
Constructors Constructor Description UnixPlatform()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]
getGetenvArgs(java.lang.String varname)
Returns an array of words to pass toRuntime.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 toRuntime.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.-
Methods inherited from class org.astrogrid.samp.Platform
getEnv, getPlatform, setPrivateRead
-
-
-
-
Method Detail
-
getHomeDirectory
public java.io.File getHomeDirectory()
Description copied from class:Platform
Returns SAMP's definition of the "home" directory.- Specified by:
getHomeDirectory
in classPlatform
- Returns:
- directory containing SAMP lockfile
-
getGetenvArgs
protected java.lang.String[] getGetenvArgs(java.lang.String varname)
Description copied from class:Platform
Returns an array of words to pass toRuntime.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.- Specified by:
getGetenvArgs
in classPlatform
- Parameters:
varname
- environment variable name to read- Returns:
- exec args
-
getPrivateReadArgs
protected java.lang.String[] getPrivateReadArgs(java.io.File file)
Description copied from class:Platform
Returns an array of words to pass toRuntime.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.- Specified by:
getPrivateReadArgs
in classPlatform
- Parameters:
file
- file to alter- Returns:
- exec args
-
-