incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [8/35] git commit: Add deprecation notice for toURI
Date Thu, 23 Feb 2012 17:53:18 GMT
Add deprecation notice for toURI


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/c32a001b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/c32a001b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/c32a001b

Branch: refs/heads/ios
Commit: c32a001b9134278bd064cb23009c7b5f77f72129
Parents: aeffdf3
Author: macdonst <simon.macdonald@gmail.com>
Authored: Wed Feb 22 12:21:46 2012 -0500
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Wed Feb 22 14:17:26 2012 -0500

----------------------------------------------------------------------
 lib/plugin/Entry.js |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/c32a001b/lib/plugin/Entry.js
----------------------------------------------------------------------
diff --git a/lib/plugin/Entry.js b/lib/plugin/Entry.js
index 63be4a4..75aba85 100644
--- a/lib/plugin/Entry.js
+++ b/lib/plugin/Entry.js
@@ -144,21 +144,25 @@ Entry.prototype.copyTo = function(parent, newName, successCallback,
errorCallbac
 
 /**
  * Return a URL 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.toURL = function(mimeType, successCallback, errorCallback) {
+Entry.prototype.toURL = function() {
     // fullPath attribute contains the full URL
     return this.fullPath;
 };
 
 /**
+ * Returns a URI that can be used to identify this entry.
+ *
+ * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the
file, when loaded through this URI.
+ * @return uri
+ */
+Entry.prototype.toURI = function(mimeType) {
+    console.log("DEPRECATED: Update your code to use 'toURL'");
+    // fullPath attribute contains the full URI
+    return this.fullPath;
+};
+
+/**
  * Remove a file or directory. It is an error to attempt to delete a
  * directory that is not empty. It is an error to attempt to delete a
  * root directory of a file system.


Mime
View raw message