public class ScriptfileUtils
extends java.lang.Object
Constructor and Description |
---|
ScriptfileUtils() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
createTempFile(Framework framework)
Create a temp file in the framework
|
static void |
setExecutePermissions(java.io.File scriptfile)
Set the executable flag on a file if supported by the OS
|
static java.io.File |
writeScriptTempfile(Framework framework,
java.io.File sourcefile)
Copy a source file to a tempfile for script execution
|
static java.io.File |
writeScriptTempfile(Framework framework,
java.io.InputStream stream)
Copy a source stream to a tempfile for script execution
|
static java.io.File |
writeScriptTempfile(Framework framework,
java.io.Reader source)
Copy reader content to a tempfile for script execution
|
static java.io.File |
writeScriptTempfile(Framework framework,
java.lang.String source)
Copy string content to a tempfile for script execution
|
public static java.io.File writeScriptTempfile(Framework framework, java.io.File sourcefile) throws java.io.IOException
framework
- frameworksourcefile
- source filejava.io.IOException
- if an error occurspublic static java.io.File writeScriptTempfile(Framework framework, java.io.InputStream stream) throws java.io.IOException
framework
- frameworkstream
- sourcejava.io.IOException
- if an error occurspublic static java.io.File writeScriptTempfile(Framework framework, java.lang.String source) throws java.io.IOException
framework
- frameworksource
- string contentjava.io.IOException
- if an error occurspublic static java.io.File writeScriptTempfile(Framework framework, java.io.Reader source) throws java.io.IOException
framework
- frameworksource
- string contentjava.io.IOException
- if an error occurspublic static java.io.File createTempFile(Framework framework) throws java.io.IOException
java.io.IOException
public static void setExecutePermissions(java.io.File scriptfile) throws java.io.IOException
scriptfile
- target filejava.io.IOException
- if an error occurs