You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by de...@apache.org on 2012/03/02 15:42:35 UTC

webworks commit: Add Entry.toURL, deprecate Entry.toURI.

Updated Branches:
  refs/heads/fileURL [created] 685abcdfb


Add Entry.toURL, deprecate Entry.toURI.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/685abcdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/685abcdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/685abcdf

Branch: refs/heads/fileURL
Commit: 685abcdfb20ea5c7f7d01a95e141bd984bd34723
Parents: 74117b4
Author: Drew Walters <de...@apache.org>
Authored: Fri Mar 2 08:42:04 2012 -0600
Committer: Drew Walters <de...@apache.org>
Committed: Fri Mar 2 08:42:04 2012 -0600

----------------------------------------------------------------------
 javascript/file.js |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/685abcdf/javascript/file.js
----------------------------------------------------------------------
diff --git a/javascript/file.js b/javascript/file.js
index 976696a..be1d2de 100644
--- a/javascript/file.js
+++ b/javascript/file.js
@@ -801,8 +801,25 @@ var Entry = Entry || (function() {
      * @param errorCallback
      *            {Function} called with a FileError
      */
+    Entry.prototype.toURL = function() {
+        // fullPath attribute contains the full URI on BlackBerry
+        return this.fullPath;
+    };
+
+    /**
+     * Return a URI that can be used to identify this entry.
+     *
+     * @param mimeType
+     *            {DOMString} for a FileEntry, the mime type to be used to
+     *            interpret the file, when loaded through this URI.
+     * @param successCallback
+     *            {Function} called with the new Entry object
+     * @param errorCallback
+     *            {Function} called with a FileError
+     */
     Entry.prototype.toURI = function(mimeType, successCallback, errorCallback) {
         // fullPath attribute contains the full URI on BlackBerry
+        console.log("DEPRECATED: Update your code to use 'toURL'");
         return this.fullPath;
     };