List of usage examples for java.io DeleteOnExitHook add
static synchronized void add(String file)
From source file:org.dhatim.archive.Archive.java
private void createTempDir() { if (tmpDir == null) { try {/*w w w. j av a 2 s.c om*/ File tmpFile = File.createTempFile("tmp", "tmp"); tmpFile.delete(); tmpDir = new File(tmpFile.getParentFile(), UUID.randomUUID().toString()); DeleteOnExitHook.add(tmpDir); } catch (IOException e) { throw new SmooksException("Unable to crete temp directory for archive.", e); } } }