|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.execution.script.ScriptfileUtils
public class ScriptfileUtils
Utility methods for writing temp files for scripts and setting file permissions.
Constructor Summary | |
---|---|
ScriptfileUtils()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptfileUtils()
Method Detail |
---|
public static java.io.File writeScriptTempfile(Framework framework, java.io.File sourcefile) throws java.io.IOException
framework
- frameworksourcefile
- source file
java.io.IOException
- if an error occurspublic static java.io.File writeScriptTempfile(Framework framework, java.io.InputStream stream) throws java.io.IOException
framework
- frameworkstream
- source
java.io.IOException
- if an error occurspublic static java.io.File writeScriptTempfile(Framework framework, java.lang.String source) throws java.io.IOException
framework
- frameworksource
- string content
java.io.IOException
- if an error occurspublic static java.io.File writeScriptTempfile(Framework framework, java.io.Reader source) throws java.io.IOException
framework
- frameworksource
- string content
java.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 file
java.io.IOException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |