You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2012/01/13 16:59:07 UTC
[34/50] git commit: updated comment
updated comment
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/70ed326d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/70ed326d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/70ed326d
Branch: refs/heads/master
Commit: 70ed326d705b1b836d977856f94e48392fcebc28
Parents: 0ecbea1
Author: Alexander Heinrich <ak...@aflx.de>
Authored: Wed Nov 30 10:00:30 2011 +0100
Committer: Alexander Heinrich <ak...@aflx.de>
Committed: Wed Nov 30 10:00:30 2011 +0100
----------------------------------------------------------------------
PhoneGapLib/javascripts/core/filetransfer.js | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/70ed326d/PhoneGapLib/javascripts/core/filetransfer.js
----------------------------------------------------------------------
diff --git a/PhoneGapLib/javascripts/core/filetransfer.js b/PhoneGapLib/javascripts/core/filetransfer.js
index 0f53adf..076bf93 100644
--- a/PhoneGapLib/javascripts/core/filetransfer.js
+++ b/PhoneGapLib/javascripts/core/filetransfer.js
@@ -91,8 +91,15 @@ FileTransfer.prototype._castUploadResult = function(pluginResult) {
return pluginResult;
}
-FileTransfer.prototype.download = function(sourceUrl, filePath, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, 'com.phonegap.filetransfer', 'download', [sourceUrl, filePath]);
+/**
+ * Downloads a file form a given URL and saves it to the specified directory.
+ * @param source {String} URL of the server to receive the file
+ * @param target {String} Full path of the file on the device
+ * @param successCallback (Function} Callback to be invoked when upload has completed
+ * @param errorCallback {Function} Callback to be invoked upon error
+ */
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
+ PhoneGap.exec(successCallback, errorCallback, 'com.phonegap.filetransfer', 'download', [source, target]);
};
/**