hudson.plugins.copyartifact
Interface CopyMethod

All Superinterfaces:
hudson.ExtensionPoint
All Known Implementing Classes:
FilePathCopyMethod

public interface CopyMethod
extends hudson.ExtensionPoint

Extension point for how files are copied. CopyArtifact plugin provides a default implementation using methods available in Hudson's FilePath class.

Author:
Alan Harder

Nested Class Summary
 
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.
 

Method Detail

init

void init(hudson.FilePath srcDir,
          hudson.FilePath baseTargetDir)
          throws java.io.IOException,
                 java.lang.InterruptedException
Called before copy-artifact operation.

Parameters:
srcDir - Source for upcoming file copy
baseTargetDir - 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

int copyAll(hudson.FilePath srcDir,
            java.lang.String filter,
            hudson.FilePath targetDir)
            throws java.io.IOException,
                   java.lang.InterruptedException
Copy files matching the given file mask to the specified target.

Parameters:
srcDir - Source directory
filter - Ant GLOB pattern
targetDir - Target directory
Returns:
Number of files that were copied
Throws:
java.io.IOException
java.lang.InterruptedException
See Also:
FilePath.copyRecursiveTo(String,FilePath)

copyOne

void copyOne(hudson.FilePath source,
             hudson.FilePath target)
             throws java.io.IOException,
                    java.lang.InterruptedException
Copy a single file.

Parameters:
source - Source file
target - 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 © 2010. All Rights Reserved.