@Test public void mkdirs() throws Exception { File folderRoot = temporaryFolder.getRoot(); File newFolder = new File(folderRoot, String.valueOf(UUID.randomUUID())); File innerNewFolder = new File(newFolder, String.valueOf(UUID.randomUUID())); Path path = new Path(innerNewFolder.toURI()); Assert.assertFalse(newFolder.isDirectory()); Assert.assertFalse(innerNewFolder.isDirectory()); SnapshotDirectory snapshotDirectory = SnapshotDirectory.permanent(path); Assert.assertFalse(snapshotDirectory.exists()); Assert.assertFalse(newFolder.isDirectory()); Assert.assertFalse(innerNewFolder.isDirectory()); Assert.assertTrue(snapshotDirectory.mkdirs()); Assert.assertTrue(newFolder.isDirectory()); Assert.assertTrue(innerNewFolder.isDirectory()); Assert.assertTrue(snapshotDirectory.exists()); }
public boolean mkdirs() throws IOException { return fileSystem.mkdirs(directory); }
SnapshotDirectory { public boolean mkdirs() throws IOException { return fileSystem.mkdirs(directory); } }
SnapshotDirectory { public boolean mkdirs() throws IOException { return fileSystem.mkdirs(directory); } private  SnapshotDirectory(@Nonnull Path directory, @Nonnull FileSystem fileSystem); private  SnapshotDirectory(@Nonnull Path directory); }
SnapshotDirectory { public boolean mkdirs() throws IOException { return fileSystem.mkdirs(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 boolean mkdirs() throws IOException { return fileSystem.mkdirs(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);  }