Class UnbindableDir
- java.lang.Object
-
- org.jenkinsci.plugins.credentialsbinding.impl.UnbindableDir
-
public class UnbindableDir extends Object
Convenience class for creating a secure temporary directory dedicated to writing credentials file(s), and getting a correspondingMultiBinding.Unbinder
instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
UnbindableDir.UnbinderImpl
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UnbindableDir
create(FilePath workspace)
Creates a new, secure, directory under a base workspace temporary directory.FilePath
getDirPath()
MultiBinding.Unbinder
getUnbinder()
-
-
-
Method Detail
-
getUnbinder
public MultiBinding.Unbinder getUnbinder()
-
getDirPath
public FilePath getDirPath()
-
create
public static UnbindableDir create(@NonNull FilePath workspace) throws IOException, InterruptedException
Creates a new, secure, directory under a base workspace temporary directory. Also instantiates anMultiBinding.Unbinder
for deleting this directory later. This can only safely be used for binding implementations for whichBindingDescriptor.requiresWorkspace()
is true.- Parameters:
workspace
- The workspace, can't be null (temporary dirs are created next to it)- Returns:
- Throws:
IOException
InterruptedException
-
-