|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.denova.runtime.UnixCommands
Issue standard unix commands.
| Field Summary | |
static java.lang.String |
UnixOsLogFilename
Diagnostic log for class. |
| Constructor Summary | |
UnixCommands()
|
|
| Method Summary | |
static boolean |
chmod(java.lang.String permissions,
java.lang.String fullpath)
Change the permissions on a file. |
static java.lang.String[] |
getEnvironment()
|
static java.lang.String |
getSystemPath()
Get the system's path from the environment. |
static void |
ln(java.lang.String existingFilename,
java.lang.String linkedFilename)
Symbolically link a file. |
static boolean |
mkdirs(java.lang.String dirPath,
java.lang.String permissions)
Creates dir path, and sets specified permissions on dirs. |
static void |
setLog(com.denova.io.Log l)
Set the filename for the log. |
static void |
symbolicallyLinkFile(java.lang.String existingFilename,
java.lang.String linkedFilename)
Symbolically link a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String UnixOsLogFilename
| Constructor Detail |
public UnixCommands()
| Method Detail |
public static java.lang.String getSystemPath()
This algorithm seems to be more for MSWindows than any *nix. What *nix uses "set"? We're getting away with this because "echo $PATH" works.
First, tries to get the path with an "echo $PATH" command; then with the "echo $path" command, and finall with a "set" command. Assumes the results of all of these commands can be redirected to a file. If the unix system doesn't support redirection on these commands, then the method returns an empty string.
returns: string with the full list; depending on the shell, the string can be separated by the path separator or blanks.
public static boolean chmod(java.lang.String permissions,
java.lang.String fullpath)
permissions - permissions for the filefullpath - full path to the file
public static void ln(java.lang.String existingFilename,
java.lang.String linkedFilename)
existingFilename - file to create a link tolinkedFilename - symbolically linked file
public static void symbolicallyLinkFile(java.lang.String existingFilename,
java.lang.String linkedFilename)
existingFilename - file to create a link tolinkedFilename - symbolically linked filepublic static void setLog(com.denova.io.Log l)
l - The new log valuepublic static java.lang.String[] getEnvironment()
public static boolean mkdirs(java.lang.String dirPath,
java.lang.String permissions)
dirPath - directory or directory pathpermissions - as an octal string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||