org.jvnet.hudson.test
Class TemporaryDirectoryAllocator

java.lang.Object
  extended by 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
TemporaryDirectoryAllocator()
           
TemporaryDirectoryAllocator(File base)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryDirectoryAllocator

public TemporaryDirectoryAllocator(File base)

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 when TemporaryDirectoryAllocator 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.



Copyright © 2004-2013. All Rights Reserved.