@Test public void testBasic() throws IOException { File tempFile = null; try (AutoDeleteDirectory autoTempFile = new AutoDeleteDirectory("test", "")) { Assert.assertTrue(autoTempFile.getFile().isDirectory()); Assert.assertEquals(0, autoTempFile.getFile().listFiles().length); tempFile = autoTempFile.getFile(); } Assert.assertTrue(!tempFile.exists()); }
public File getFile() { return tempFile; }
AutoDeleteDirectory implements Closeable { public File getFile() { return tempFile; } }
AutoDeleteDirectory implements Closeable { public File getFile() { return tempFile; } AutoDeleteDirectory(File file);  AutoDeleteDirectory(String prefix, String suffix); }
AutoDeleteDirectory implements Closeable { public File getFile() { return tempFile; } AutoDeleteDirectory(File file);  AutoDeleteDirectory(String prefix, String suffix); String getAbsolutePath(); AutoDeleteDirectory child(String child); File getFile(); @Override void close(); }
AutoDeleteDirectory implements Closeable { public File getFile() { return tempFile; } AutoDeleteDirectory(File file);  AutoDeleteDirectory(String prefix, String suffix); String getAbsolutePath(); AutoDeleteDirectory child(String child); File getFile(); @Override void close();  }