Class UnbindableDir
java.lang.Object
org.jenkinsci.plugins.credentialsbinding.impl.UnbindableDir
Convenience class for creating a secure temporary directory dedicated to writing credentials file(s), and getting a
corresponding
MultiBinding.Unbinder
instance.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic UnbindableDir
Creates a new, secure, directory under a base workspace temporary directory.
-
Method Details
-
getUnbinder
-
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
-