void updateListView() throws Exception { mFileList.clear(); try { InitFileByPath(mFile.getPath()); ArrayList<FileInfo> list = mFile.getFileInfo(); Iterator<FileInfo> it = list.iterator(); while (it.hasNext()) { mFileList.add(it.next()); } mFragHandler.post(mUpdateUI); } catch (Exception e) { Log.e("updateListView", "Update list view is fail."); throw e; } }
private void onClickUp() { /*String path = getUpPath(); if (path == null) { return; } */ gotoNextFragment(mFile.getParent()); }
String getPath() { String ret = null; if (mFile == null) { return null; } try { ret = mFile.getPath(); } catch (Exception e) { e.printStackTrace(); Log.e("FragmentBase.getPath", "get path fail:" + e.getMessage()); } return ret; }
private void fileToClipboard(FileInfo f) throws Exception { try { String fileName = mFile.getPath() + RemoteFile.FILE_DIRECTORY_SPLITE_LABLE + f.getFileName(); if (f.isDirectory()) { fileName += Global.DIRECTORY_SPLITE_LABLE; } FileBase r = getNewFileInstance(fileName); Global.addFileToClipboardFileList(r); } catch (Exception e) { e.printStackTrace(); Log.e("fileToClipboard", "File to clipboard fail:" + e.getMessage()); throw e; } }