Package org.jvnet.hudson.test
Class TemporaryDirectoryAllocator
- java.lang.Object
-
- org.jvnet.hudson.test.TemporaryDirectoryAllocator
-
public class TemporaryDirectoryAllocator extends Object
Allocates temporary directories and cleans it up at the end.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description TemporaryDirectoryAllocator()
TemporaryDirectoryAllocator(File base)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
allocate()
Allocates a new empty temporary directory and returns it.void
dispose()
Deletes all allocated temporary directories.void
disposeAsync()
Deletes all allocated temporary directories asynchronously.
-
-
-
Constructor Detail
-
TemporaryDirectoryAllocator
@Deprecated public TemporaryDirectoryAllocator(File base)
Deprecated.
-
TemporaryDirectoryAllocator
public TemporaryDirectoryAllocator()
-
-
Method Detail
-
allocate
public File allocate() throws IOException
Allocates a new empty temporary directory and returns it. This directory will be wiped out whenTemporaryDirectoryAllocator
gets disposed. When this method returns, the directory already exists.- Throws:
IOException
-
dispose
public void dispose() throws IOException, InterruptedException
Deletes all allocated temporary directories.- Throws:
IOException
InterruptedException
-
disposeAsync
public void disposeAsync()
Deletes all allocated temporary directories asynchronously.
-
-