mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
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);
|
||||
|
||||
// create FileEntry object
|
||||
JSONObject entry = new JSONObject();
|
||||
FileUtils fileUtil = new FileUtils();
|
||||
|
||||
entry.put("isFile", file.isFile());
|
||||
entry.put("isDirectory", file.isDirectory());
|
||||
entry.put("name", file.getName());
|
||||
entry.put("fullPath", file.getAbsolutePath());
|
||||
|
||||
return entry;
|
||||
return fileUtil.getEntry(file);
|
||||
} catch (Exception e) {
|
||||
Log.d(LOG_TAG, e.getMessage(), e);
|
||||
throw new IOException("Error while downloading");
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user