Package com.logicaldoc.core.automation
Class SystemTool
java.lang.Object
com.logicaldoc.core.automation.SystemTool
Utility functions for interacting with the Operative System from within the
Automation
- Since:
- 7.5.1
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Executes a commandint
Executes a commandexecGetOutput
(String commandline) Executes a command and gets it's output.execGetOutput
(String commandline, String path) Executes a command and gets it's output
-
Constructor Details
-
SystemTool
public SystemTool()
-
-
Method Details
-
execGetOutput
Executes a command and gets it's output. The path of the command must be listed in the allowed-commands.txt- Parameters:
commandline
- the command to execute- Returns:
- the output of the command
- Throws:
IOException
- error executing the command or command not found
-
execGetOutput
Executes a command and gets it's output- Parameters:
commandline
- the command to execute. The path of the command must be listed in the allowed-commands.txtpath
- the path to set as current folder before executing the command- Returns:
- the output of the command
- Throws:
IOException
- error executing the command or command not found
-
exec
Executes a command- Parameters:
commandline
- the command to execute. The path of the command must be listed in the allowed-commands.txt- Returns:
- the execution's result
- Throws:
IOException
- error executing the command or command not found
-
exec
Executes a command- Parameters:
commandline
- the command to execute. The path of the command must be listed in the allowed-commands.txtpath
- the path to set as current folder before executing the command- Returns:
- the execution's result
- Throws:
IOException
- error executing the command or command not found
-