Esempio n. 1
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;
  }
Esempio n. 2
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;
   }
 }
Esempio n. 3
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;
    }
  }