Updated Branches: refs/heads/master de4e554c2 -> 4f9b6e7ea
Update FileEntry and DirectoryEntry to deprecate toURI() and add toURL Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/4f9b6e7e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/4f9b6e7e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/4f9b6e7e Branch: refs/heads/master Commit: 4f9b6e7ea7b4fd793579ff0501e7d9c4d85d5b84 Parents: de4e554 Author: Becky Gibson <becka...@apache.org> Authored: Mon Feb 27 15:54:04 2012 -0500 Committer: Becky Gibson <becka...@apache.org> Committed: Mon Feb 27 15:54:04 2012 -0500 ---------------------------------------------------------------------- CordovaLib/javascripts/core/file.js | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/4f9b6e7e/CordovaLib/javascripts/core/file.js ---------------------------------------------------------------------- diff --git a/CordovaLib/javascripts/core/file.js b/CordovaLib/javascripts/core/file.js index 540963c..6681cbb 100644 --- a/CordovaLib/javascripts/core/file.js +++ b/CordovaLib/javascripts/core/file.js @@ -974,7 +974,13 @@ DirectoryEntry.prototype.remove = function(successCallback, errorCallback) { * @param {Function} successCallback is called with the new entry * @param {Function} errorCallback is called with a FileError */ + DirectoryEntry.prototype.toURL = function(mimeType, successCallback, errorCallback) { + return "file://localhost" + this.fullPath; + //Cordova.exec(successCallback, errorCallback, "org.apache.cordova.file", "toURI", [this.fullPath, mimeType]); +}; + DirectoryEntry.prototype.toURI = function(mimeType, successCallback, errorCallback) { + console.log("DEPRECATED: Update your code to use 'toURL'"); return "file://localhost" + this.fullPath; //Cordova.exec(successCallback, errorCallback, "org.apache.cordova.file", "toURI", [this.fullPath, mimeType]); }; @@ -1115,7 +1121,13 @@ FileEntry.prototype.remove = function(successCallback, errorCallback) { * @param {Function} successCallback is called with the new entry * @param {Function} errorCallback is called with a FileError */ +FileEntry.prototype.toURL = function(mimeType, successCallback, errorCallback) { + return "file://localhost" + this.fullPath; + //Cordova.exec(successCallback, errorCallback, "org.apache.cordova.file", "toURI", [this.fullPath, mimeType]); +}; + FileEntry.prototype.toURI = function(mimeType, successCallback, errorCallback) { + console.log("DEPRECATED: Update your code to use 'toURL'"); return "file://localhost" + this.fullPath; //Cordova.exec(successCallback, errorCallback, "org.apache.cordova.file", "toURI", [this.fullPath, mimeType]); };