forked from github/cordova-android
made getEntry of FileUtils public in order to avoid duplicate code in FileTransfer
This commit is contained in:
parent
75963c88d5
commit
8dbb8f58b1
@ -405,14 +405,9 @@ public class FileTransfer extends Plugin {
|
|||||||
Log.d(LOG_TAG, "Saved file: " + filePath);
|
Log.d(LOG_TAG, "Saved file: " + filePath);
|
||||||
|
|
||||||
// create FileEntry object
|
// create FileEntry object
|
||||||
JSONObject entry = new JSONObject();
|
FileUtils fileUtil = new FileUtils();
|
||||||
|
|
||||||
entry.put("isFile", file.isFile());
|
return fileUtil.getEntry(file);
|
||||||
entry.put("isDirectory", file.isDirectory());
|
|
||||||
entry.put("name", file.getName());
|
|
||||||
entry.put("fullPath", file.getAbsolutePath());
|
|
||||||
|
|
||||||
return entry;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.d(LOG_TAG, e.getMessage(), e);
|
Log.d(LOG_TAG, e.getMessage(), e);
|
||||||
throw new IOException("Error while downloading");
|
throw new IOException("Error while downloading");
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user