The canonical path of the current thread's active temporary folder.
RuntimeException
if not running within a withTempFolder block
The current thread's active temporary folder.
RuntimeException
if not running within a withTempFolder block
Runs the given block of code with the presence of a temporary folder whose name can be obtained from within the code block by calling folderName.
Runs the given block of code with the presence of a temporary folder whose name can be obtained from within the code block by calling folderName.
Use of this function may not be nested.
Test mixin that creates a temporary thread-local folder for a block of code to execute in. The folder is recursively deleted after the test.
Note, the com.twitter.util.io package would be a better home for this trait.
Note that multiple uses of TempFolder cannot be nested, because the temporary directory is effectively a thread-local global.