hudson.plugins.copyartifact
Class FilePathCopyMethod
java.lang.Object
hudson.plugins.copyartifact.Copier
hudson.plugins.copyartifact.FilePathCopyMethod
- All Implemented Interfaces:
- hudson.ExtensionPoint, CopyMethod
@Extension(ordinal=-200.0)
public class FilePathCopyMethod
- extends Copier
Default implementation of CopyMethod extension point,
using the Jenkins 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 |
Copier |
clone()
Creates a clone. |
int |
copyAll(hudson.FilePath srcDir,
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. |
FilePathCopyMethod
public FilePathCopyMethod()
copyAll
public int copyAll(hudson.FilePath srcDir,
String filter,
hudson.FilePath targetDir)
throws IOException,
InterruptedException
- Description copied from class:
Copier
- Copy files matching the given file mask to the specified target.
- Specified by:
copyAll in interface CopyMethod- Specified by:
copyAll in class Copier
- Parameters:
srcDir - Source directoryfilter - Ant GLOB patterntargetDir - Target directory
- Returns:
- Number of files that were copied
- Throws:
IOException
InterruptedException- See Also:
FilePath#recursiveCopyTo(String,FilePath)
copyOne
public void copyOne(hudson.FilePath source,
hudson.FilePath target)
throws IOException,
InterruptedException
- Description copied from class:
Copier
- Copy a single file.
- Specified by:
copyOne in interface CopyMethod- Specified by:
copyOne in class Copier
- 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:
IOException
InterruptedException- See Also:
FilePath.copyTo(FilePath)
clone
public Copier clone()
- Description copied from class:
Copier
- Creates a clone.
This method is only called before the
Copier.init(Run, AbstractBuild, FilePath, FilePath) method
to allow each init-end session to run against different objects, so you need not copy any state
that your Copier might maintain.
This is a cheap hack to implement a factory withot breaking backward compatibility.
If you maintain no state, this method can return this without creating a copy.
- Specified by:
clone in class Copier
Copyright © 2004-2012 Hudson. All Rights Reserved.