hudson.plugins.copyartifact
Class FilePathCopyMethod
java.lang.Object
hudson.plugins.copyartifact.FilePathCopyMethod
- All Implemented Interfaces:
- hudson.ExtensionPoint, CopyMethod
@Extension(ordinal=-100.0)
public class FilePathCopyMethod
- extends java.lang.Object
- implements CopyMethod
Default implementation of CopyMethod extension point,
using Hudson's FilePath class. Has -100 ordinal value so any other
plugin implementing this extension point should override this one.
- Author:
- Alan Harder
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
|
Method Summary |
int |
copyAll(hudson.FilePath srcDir,
java.lang.String filter,
hudson.FilePath targetDir)
Copy files matching the given file mask to the specified target. |
void |
copyOne(hudson.FilePath source,
hudson.FilePath target)
Copy a single file. |
void |
init(hudson.FilePath srcDir,
hudson.FilePath baseTargetDir)
Called before copy-artifact operation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilePathCopyMethod
public FilePathCopyMethod()
init
public void init(hudson.FilePath srcDir,
hudson.FilePath baseTargetDir)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from interface:
CopyMethod
- Called before copy-artifact operation.
- Specified by:
init in interface CopyMethod
- Parameters:
srcDir - Source for upcoming file copybaseTargetDir - Base target dir for upcoming file copy (the copy-artifact
build step may later specify a deeper target dir)
- Throws:
java.io.IOException
java.lang.InterruptedException
copyAll
public int copyAll(hudson.FilePath srcDir,
java.lang.String filter,
hudson.FilePath targetDir)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from interface:
CopyMethod
- Copy files matching the given file mask to the specified target.
- Specified by:
copyAll in interface CopyMethod
- Parameters:
srcDir - Source directoryfilter - Ant GLOB patterntargetDir - Target directory
- Returns:
- Number of files that were copied
- Throws:
java.io.IOException
java.lang.InterruptedException- See Also:
FilePath#recursiveCopyTo(String,FilePath)
copyOne
public void copyOne(hudson.FilePath source,
hudson.FilePath target)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from interface:
CopyMethod
- Copy a single file.
- Specified by:
copyOne in interface CopyMethod
- Parameters:
source - Source filetarget - Target file (includes filename; this is not the target directory).
Directory for target should already exist (copy-artifact build step calls mkdirs).
- Throws:
java.io.IOException
java.lang.InterruptedException- See Also:
FilePath.copyTo(FilePath)
Copyright © 2004-2011. All Rights Reserved.