public class StorageUtil extends Object
Constructor and Description |
---|
StorageUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getRelative(hudson.FilePath include,
hudson.FilePath workspace)
Compute the relative path of the given file inclusion, relative to the
given workspace.
|
static String |
getStrippedFilename(String filename,
String pathPrefix)
If a path prefix to strip has been specified, and the input string
starts with that prefix, returns the portion of the input after that
prefix.
|
static String |
replaceMacro(String name,
hudson.model.Run<?,?> run,
hudson.model.TaskListener listener)
Perform variable expansion for non-pipeline steps.
|
public static String getRelative(hudson.FilePath include, hudson.FilePath workspace) throws UploadException
include
- The file whose relative path we are computingworkspace
- The workspace containing the included file.UploadException
- when the input is malformedpublic static String getStrippedFilename(String filename, String pathPrefix)
public static String replaceMacro(String name, hudson.model.Run<?,?> run, hudson.model.TaskListener listener) throws InterruptedException, IOException
name
- The name, potentially including with variablesrun
- The current run, used to determine pipeline status and to get
environment.listener
- Task listener, used to get environmentInterruptedException
IOException
Copyright © 2016–2017. All rights reserved.