Package com.logicaldoc.core.automation
Class SystemTool
- java.lang.Object
 - 
- com.logicaldoc.core.automation.SystemTool
 
 
- 
public class SystemTool extends Object
Utility functions for interacting with the Operative System from within the Automation- Since:
 - 7.5.1
 - Author:
 - Marco Meschieri - LogicalDOC
 
 
- 
- 
Constructor Summary
Constructors Constructor Description SystemTool() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intexec(String commandline)Executes a commandintexec(String commandline, String path)Executes a commandStringexecGetOutput(String commandline)Executes a command and gets it's outputStringexecGetOutput(String commandline, String path)Executes a command and gets it's output 
 - 
 
- 
- 
Method Detail
- 
execGetOutput
public String execGetOutput(String commandline) throws IOException
Executes a command and gets it's output- Parameters:
 commandline- the command to execute- Returns:
 - the output of the command
 - Throws:
 IOException- error executing the command or command not found
 
- 
execGetOutput
public String execGetOutput(String commandline, String path) throws IOException
Executes a command and gets it's output- Parameters:
 commandline- the command to executepath- 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
public int exec(String commandline) throws IOException
Executes a command- Parameters:
 commandline- the command to execute- Returns:
 - the execution's result
 - Throws:
 IOException- error executing the command or command not found
 
- 
exec
public int exec(String commandline, String path) throws IOException
Executes a command- Parameters:
 commandline- the command to executepath- 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
 
 - 
 
 -