incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [18/32] git commit: Fixing FileTranfer.download so it shows up on 1.3.0
Date Fri, 20 Jan 2012 19:56:03 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/e583e02d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/e583e02d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/e583e02d

Branch: refs/heads/master
Commit: e583e02de961160657d097a843d19f6263095bfe
Parents: 2b7473d
Author: macdonst <simon.macdonald@gmail.com>
Authored: Tue Jan 3 04:49:10 2012 +0800
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Tue Jan 3 04:50:00 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/e583e02d/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/e583e02d/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