com.dtolabs.rundeck.core.execution.service
Interface FileCopier

All Known Subinterfaces:
DestinationFileCopier
All Known Implementing Classes:
JschScpFileCopier, LocalFileCopier

public interface FileCopier

FileCopier copies a file or its contents to a local or remote node. The destination on the node is not predetermined, but some utility methods of BaseFileCopier can be used to generate a destination file path.


Method Summary
 java.lang.String copyFile(ExecutionContext context, java.io.File file, INodeEntry node)
          Copy the contents of an input stream to the node
 java.lang.String copyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node)
          Copy the contents of an input stream to the node
 java.lang.String copyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node)
          Copy the contents of an input stream to the node
 

Method Detail

copyFileStream

java.lang.String copyFileStream(ExecutionContext context,
                                java.io.InputStream input,
                                INodeEntry node)
                                throws FileCopierException
Copy the contents of an input stream to the node

Parameters:
context - context
input - the input stream
node -
Returns:
File path of the file after copying to the node
Throws:
FileCopierException - if an error occurs

copyFile

java.lang.String copyFile(ExecutionContext context,
                          java.io.File file,
                          INodeEntry node)
                          throws FileCopierException
Copy the contents of an input stream to the node

Parameters:
context - context
file - local file tocopy
node -
Returns:
File path of the file after copying to the node
Throws:
FileCopierException - if an error occurs

copyScriptContent

java.lang.String copyScriptContent(ExecutionContext context,
                                   java.lang.String script,
                                   INodeEntry node)
                                   throws FileCopierException
Copy the contents of an input stream to the node

Parameters:
context - context
script - file content string
node -
Returns:
File path of the file after copying to the node
Throws:
FileCopierException - if an error occurs