CB-7167 [BlackBerry10] Add directory support to getFileMetadata
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/6b099505 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/6b099505 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/6b099505 Branch: refs/heads/master Commit: 6b099505d7571abc10411faa39e1e592a441d1b4 Parents: d1ab0d9 Author: Bryan Higgins <[email protected]> Authored: Fri Jul 18 11:30:00 2014 -0400 Committer: Bryan Higgins <[email protected]> Committed: Fri Jul 18 14:16:45 2014 -0400 ---------------------------------------------------------------------- www/blackberry10/getFileMetadata.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/6b099505/www/blackberry10/getFileMetadata.js ---------------------------------------------------------------------- diff --git a/www/blackberry10/getFileMetadata.js b/www/blackberry10/getFileMetadata.js index 30b256c..dd3c1a5 100644 --- a/www/blackberry10/getFileMetadata.js +++ b/www/blackberry10/getFileMetadata.js @@ -55,7 +55,11 @@ module.exports = function (success, fail, args) { }; resolve(function (entry) { requestAnimationFrame(function () { - entry.nativeEntry.file(onSuccess, onFail); + if (entry.nativeEntry.file) { + entry.nativeEntry.file(onSuccess, onFail); + } else { + entry.nativeEntry.getMetadata(onSuccess, onFail); + } }); }, onFail, [uri]); };
