incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [16/29] git commit: Fixing FileTranfer.download so it shows up on 1.3.0
Date Thu, 12 Jan 2012 20:14:00 GMT
Fixing FileTranfer.download so it shows up on 1.3.0


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

Branch: refs/heads/master
Commit: 64b5588ddf5dc0a944d89fdb96efb3fc630202e8
Parents: 454209e
Author: macdonst <simon.macdonald@gmail.com>
Authored: Tue Jan 3 04:49:10 2012 +0800
Committer: Fil Maj <filip.maj@nitobi.com>
Committed: Thu Jan 12 12:13:44 2012 -0800

----------------------------------------------------------------------
 .../phonegap/file/filetransfer/filetransfer.md     |   28 +++++++++++++++
 .../phonegap/file/filetransfer/filetransfer.md     |    2 +-
 2 files changed, 29 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/64b5588d/docs/en/1.3.0/phonegap/file/filetransfer/filetransfer.md
----------------------------------------------------------------------
diff --git a/docs/en/1.3.0/phonegap/file/filetransfer/filetransfer.md b/docs/en/1.3.0/phonegap/file/filetransfer/filetransfer.md
index 154566a..a8d6166 100644
--- a/docs/en/1.3.0/phonegap/file/filetransfer/filetransfer.md
+++ b/docs/en/1.3.0/phonegap/file/filetransfer/filetransfer.md
@@ -118,3 +118,31 @@ Full Example
     </body>
     </html>
 
+download
+--------------
+
+__Parameters:__
+
+- __source__ - URL of the server to receive the file
+- __target__ - Full path of the file on the device
+- __successCallback__ - A callback that is called with a FileEntry object. _(Function)_
+- __errorCallback__ - A callback that is called if an error occurs retrieving the Metadata.
Invoked with a FileError object. _(Function)_
+
+__Quick Example__
+
+     // !! Assumes variable url contains a valid URI to a file on a server and filePath is
a valid path on the device
+
+    var fileTransfer = new FileTransfer();
+    
+    fileTransfer.download(
+        url,
+        filePath,
+        function(entry) {
+            console.log("download complete: " + entry.fullPath);
+        },
+        function(error) {
+            console.log("download error source " + error.source);
+            console.log("download error target " + error.target);
+            console.log("upload error code" + error.code);
+        }
+    );

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/64b5588d/docs/en/edge/phonegap/file/filetransfer/filetransfer.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/file/filetransfer/filetransfer.md b/docs/en/edge/phonegap/file/filetransfer/filetransfer.md
index 3b57c90..12de7e2 100644
--- a/docs/en/edge/phonegap/file/filetransfer/filetransfer.md
+++ b/docs/en/edge/phonegap/file/filetransfer/filetransfer.md
@@ -140,7 +140,7 @@ __Parameters:__
 
 - __source__ - URL of the server to receive the file
 - __target__ - Full path of the file on the device
-- __successCallback__ - A callback that is called with a Metadata object. _(Function)_
+- __successCallback__ - A callback that is called with a FileEntry object. _(Function)_
 - __errorCallback__ - A callback that is called if an error occurs retrieving the Metadata.
Invoked with a FileError object. _(Function)_
 
 __Quick Example__


Mime
View raw message