@Test @DisplayName("Check that the handle cannot descend into files") void down_2(@TempDir Path temp) throws IOException { Files.createFile(temp.resolve("test.txt")); try (FsHandle fs = new FsHandle(temp.toString())) { assertFalse(fs.down("test.txt")); } }
public boolean down(String directory) { if (directory == null) throw new IllegalArgumentException(); Path potential = ref.resolve(directory); if (Files.isDirectory(potential) && Files.exists(potential)) { movePath(potential); return true; } return false; }
FsHandle implements Closeable { public boolean down(String directory) { if (directory == null) throw new IllegalArgumentException(); Path potential = ref.resolve(directory); if (Files.isDirectory(potential) && Files.exists(potential)) { movePath(potential); return true; } return false; } }
FsHandle implements Closeable { public boolean down(String directory) { if (directory == null) throw new IllegalArgumentException(); Path potential = ref.resolve(directory); if (Files.isDirectory(potential) && Files.exists(potential)) { movePath(potential); return true; } return false; } FsHandle();  FsHandle(String start);  FsHandle(String start, FsHandleOptions options);  FsHandle(FileSystem fs, String start, FsHandleOptions options); }
FsHandle implements Closeable { public boolean down(String directory) { if (directory == null) throw new IllegalArgumentException(); Path potential = ref.resolve(directory); if (Files.isDirectory(potential) && Files.exists(potential)) { movePath(potential); return true; } return false; } FsHandle();  FsHandle(String start);  FsHandle(String start, FsHandleOptions options);  FsHandle(FileSystem fs, String start, FsHandleOptions options); int getId(); String pwd(); void addUpdateCallback(Consumer<EV_FileListing> callback); boolean up(); boolean down(String directory); boolean setPath(String path); List<FileListlet> list(); @Override void close(); }
FsHandle implements Closeable { public boolean down(String directory) { if (directory == null) throw new IllegalArgumentException(); Path potential = ref.resolve(directory); if (Files.isDirectory(potential) && Files.exists(potential)) { movePath(potential); return true; } return false; } FsHandle();  FsHandle(String start);  FsHandle(String start, FsHandleOptions options);  FsHandle(FileSystem fs, String start, FsHandleOptions options); int getId(); String pwd(); void addUpdateCallback(Consumer<EV_FileListing> callback); boolean up(); boolean down(String directory); boolean setPath(String path); List<FileListlet> list(); @Override void close();  }