@Deprecated public abstract class Copier extends Object implements ExtensionPoint
A copier instance
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
Copier()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract Copier |
clone()
Deprecated.
Creates a clone.
|
int |
copyAll(FilePath srcDir,
String filter,
FilePath targetDir)
Deprecated.
|
int |
copyAll(FilePath srcDir,
String filter,
FilePath targetDir,
boolean fingerprintArtifacts)
Deprecated.
call/override
copyAll(FilePath, String, String, FilePath, boolean) instead. |
int |
copyAll(FilePath srcDir,
String filter,
String excludes,
FilePath targetDir,
boolean fingerprintArtifacts)
Deprecated.
Copy files matching the given file mask to the specified target.
|
void |
copyOne(FilePath source,
FilePath target)
Deprecated.
call/override
copyOne(FilePath source, FilePath target, boolean fingerprintArtifacts) instead. |
abstract void |
copyOne(FilePath source,
FilePath target,
boolean fingerprintArtifacts)
Deprecated.
Copy a single file.
|
void |
end()
Deprecated.
Ends what's started by the
init(Run, AbstractBuild, FilePath, FilePath) method. |
void |
init(Run src,
AbstractBuild<?,?> dst,
FilePath srcDir,
FilePath baseTargetDir)
Deprecated.
|
void |
initialize(Run<?,?> src,
Run<?,?> dst,
FilePath srcDir,
FilePath baseTargetDir)
Deprecated.
Called before copy-artifact operation.
|
public void initialize(Run<?,?> src, Run<?,?> dst, FilePath srcDir, FilePath baseTargetDir) throws IOException, InterruptedException
src
- The build record from which we are copying artifacts.dst
- The built into which we are copying artifacts.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)IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.@Deprecated public void init(Run src, AbstractBuild<?,?> dst, FilePath srcDir, FilePath baseTargetDir) throws IOException, InterruptedException
initialize(hudson.model.Run, hudson.model.Run, hudson.FilePath, hudson.FilePath)
src
- The build record from which we are copying artifacts.dst
- The built into which we are copying artifacts.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)IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.@Deprecated public int copyAll(FilePath srcDir, String filter, FilePath targetDir) throws IOException, InterruptedException
copyAll(FilePath srcDir, String filter, String excludes, FilePath targetDir, boolean fingerprintArtifacts)
instead.srcDir
- Source directoryfilter
- Ant GLOB patterntargetDir
- Target directoryIOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.@Deprecated public int copyAll(FilePath srcDir, String filter, FilePath targetDir, boolean fingerprintArtifacts) throws IOException, InterruptedException
copyAll(FilePath, String, String, FilePath, boolean)
instead.srcDir
- Source directoryfilter
- Ant GLOB patterntargetDir
- Target directoryfingerprintArtifacts
- boolean controlling if the copy should also fingerprint the artifactsIOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.public int copyAll(FilePath srcDir, String filter, String excludes, FilePath targetDir, boolean fingerprintArtifacts) throws IOException, InterruptedException
Copier
.srcDir
- Source directoryfilter
- Ant GLOB patternexcludes
- Ant GLOB pattern. Can be null.targetDir
- Target directoryfingerprintArtifacts
- boolean controlling if the copy should also fingerprint the artifactsIOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.FilePath.copyRecursiveTo(String,FilePath)
@Deprecated public void copyOne(FilePath source, FilePath target) throws IOException, InterruptedException
copyOne(FilePath source, FilePath target, boolean fingerprintArtifacts)
instead.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).IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.public abstract void copyOne(FilePath source, FilePath target, boolean fingerprintArtifacts) throws IOException, InterruptedException
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).fingerprintArtifacts
- boolean controlling if the copy should also fingerprint the artifactsIOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.FilePath.copyTo(FilePath)
public void end() throws IOException, InternalError
init(Run, AbstractBuild, FilePath, FilePath)
method.IOException
- if an error occurs while performing the operation.InternalError
public abstract Copier clone()
init(Run, AbstractBuild, FilePath, FilePath)
method
to allow each initialize-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.Copyright © 2016–2022. All rights reserved.