public abstract class TempFileSpace extends Object
Plugins are expected to get this through Exec.getTempFileSpace()
.
Constructor and Description |
---|
TempFileSpace(File dir)
Deprecated.
The constructor is no longer available. Use
Exec.getTempFileSpace() instead. |
Modifier and Type | Method and Description |
---|---|
abstract void |
cleanup()
Cleans up the temporary file space, and everything in the space.
|
abstract File |
createTempFile()
Creates a temporary file in the space, with the default file name prefix, and the default file extension suffix.
|
abstract File |
createTempFile(String fileExt)
Creates a temporary file in the space, with the default file name prefix, and the specified file extension suffix.
|
abstract File |
createTempFile(String prefix,
String fileExt)
Creates a temporary file in the space, with the specified file name prefix, and the specified file extension suffix.
|
static TempFileSpace |
with(Path baseDir,
String prefix)
Deprecated.
The static creator method is no longer available. Use
Exec.getTempFileSpace() instead. |
@Deprecated public TempFileSpace(File dir)
Exec.getTempFileSpace()
instead.@Deprecated public static TempFileSpace with(Path baseDir, String prefix) throws IOException
Exec.getTempFileSpace()
instead.IOException
public abstract File createTempFile()
File
createdpublic abstract File createTempFile(String fileExt)
fileExt
- the file extension suffix without a leading dot ('.'
)File
createdpublic abstract File createTempFile(String prefix, String fileExt)
prefix
- the file name prefixfileExt
- the file extension suffix without a leading dot ('.'
)File
createdpublic abstract void cleanup()
It is to be called along with Embulk's cleanup process. Plugins should not call this directly.