示例#1
0
 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;
   }
 }
示例#2
0
  private void onClickUp() {
    /*String path = getUpPath();
    if (path == null) {
    	return;
    }
    */

    gotoNextFragment(mFile.getParent());
  }
示例#3
0
  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;
  }
示例#4
0
  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;
    }
  }