@Test public void temporary() throws Exception { File folderRoot = temporaryFolder.getRoot(); File folder = new File(folderRoot, String.valueOf(UUID.randomUUID())); Assert.assertTrue(folder.mkdirs()); SnapshotDirectory tmpSnapshotDirectory = SnapshotDirectory.temporary(folder); Assert.assertNull(tmpSnapshotDirectory.completeSnapshotAndGetHandle()); Assert.assertTrue(tmpSnapshotDirectory.cleanup()); Assert.assertFalse(folder.exists()); }
public static SnapshotDirectory temporary(@Nonnull File directory) throws IOException { return new TemporarySnapshotDirectory(directory); }
SnapshotDirectory { public static SnapshotDirectory temporary(@Nonnull File directory) throws IOException { return new TemporarySnapshotDirectory(directory); } }
SnapshotDirectory { public static SnapshotDirectory temporary(@Nonnull File directory) throws IOException { return new TemporarySnapshotDirectory(directory); } private  SnapshotDirectory(@Nonnull Path directory, @Nonnull FileSystem fileSystem); private  SnapshotDirectory(@Nonnull Path directory); }
SnapshotDirectory { public static SnapshotDirectory temporary(@Nonnull File directory) throws IOException { return new TemporarySnapshotDirectory(directory); } private  SnapshotDirectory(@Nonnull Path directory, @Nonnull FileSystem fileSystem); private  SnapshotDirectory(@Nonnull Path directory); @Nonnull Path getDirectory(); boolean mkdirs(); @Nonnull FileSystem getFileSystem(); boolean exists(); FileStatus[] listStatus(); boolean cleanup(); boolean isSnapshotCompleted(); @Nullable abstract DirectoryStateHandle completeSnapshotAndGetHandle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static SnapshotDirectory temporary(@Nonnull File directory); static SnapshotDirectory permanent(@Nonnull Path directory); }
SnapshotDirectory { public static SnapshotDirectory temporary(@Nonnull File directory) throws IOException { return new TemporarySnapshotDirectory(directory); } private  SnapshotDirectory(@Nonnull Path directory, @Nonnull FileSystem fileSystem); private  SnapshotDirectory(@Nonnull Path directory); @Nonnull Path getDirectory(); boolean mkdirs(); @Nonnull FileSystem getFileSystem(); boolean exists(); FileStatus[] listStatus(); boolean cleanup(); boolean isSnapshotCompleted(); @Nullable abstract DirectoryStateHandle completeSnapshotAndGetHandle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static SnapshotDirectory temporary(@Nonnull File directory); static SnapshotDirectory permanent(@Nonnull Path directory);  }