@Test(timeout=10000L) public void testDownloadFileFromSubNode() throws Exception { initTreeTable(); BoxFolder root = nav.listFolders().get(0); BoxNavigation newNav = nav.navigate(root); BoxFile file = newNav.listFiles().get(0); BoxPath remotePath = BoxFileSystem.getRoot().resolve(TEST_FOLDER).resolve(SUB_FILE); controller.downloadBoxObject(file, newNav, remotePath, Paths.get(TMP_DIR)); executeTransactions(); File testFile = new File(TMP_DIR + "/" + SUB_FILE); assertTrue(testFile.exists()); }
void downloadBoxObject(BoxObject boxObject, ReadableBoxNavigation nav, BoxPath source, Path destination) throws QblStorageException { destination = destination.resolve(boxObject.getName()); if (boxObject instanceof BoxFile) { downloadFile((BoxFile)boxObject, nav, source, destination); } else { downloadBoxFolder(nav, source, destination); } }
RemoteFSController extends AbstractController implements Initializable { void downloadBoxObject(BoxObject boxObject, ReadableBoxNavigation nav, BoxPath source, Path destination) throws QblStorageException { destination = destination.resolve(boxObject.getName()); if (boxObject instanceof BoxFile) { downloadFile((BoxFile)boxObject, nav, source, destination); } else { downloadBoxFolder(nav, source, destination); } } }
RemoteFSController extends AbstractController implements Initializable { void downloadBoxObject(BoxObject boxObject, ReadableBoxNavigation nav, BoxPath source, Path destination) throws QblStorageException { destination = destination.resolve(boxObject.getName()); if (boxObject instanceof BoxFile) { downloadFile((BoxFile)boxObject, nav, source, destination); } else { downloadBoxFolder(nav, source, destination); } }  }
RemoteFSController extends AbstractController implements Initializable { void downloadBoxObject(BoxObject boxObject, ReadableBoxNavigation nav, BoxPath source, Path destination) throws QblStorageException { destination = destination.resolve(boxObject.getName()); if (boxObject instanceof BoxFile) { downloadFile((BoxFile)boxObject, nav, source, destination); } else { downloadBoxFolder(nav, source, destination); } }  @Override void initialize(URL location, ResourceBundle resources); }
RemoteFSController extends AbstractController implements Initializable { void downloadBoxObject(BoxObject boxObject, ReadableBoxNavigation nav, BoxPath source, Path destination) throws QblStorageException { destination = destination.resolve(boxObject.getName()); if (boxObject instanceof BoxFile) { downloadFile((BoxFile)boxObject, nav, source, destination); } else { downloadBoxFolder(nav, source, destination); } }  @Override void initialize(URL location, ResourceBundle resources); static final int OPTION_EDGE_SIZE; }