You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/06/17 01:41:58 UTC
[1/5] git commit: Update FileProxy.js
Repository: cordova-plugin-file
Updated Branches:
refs/heads/master cbcd0f461 -> 41d418398
Update FileProxy.js
Handle an encoding error
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/5d88898d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/5d88898d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/5d88898d
Branch: refs/heads/master
Commit: 5d88898dee86435a5e0a585909aeb4174adfc650
Parents: 21e1196
Author: Tanaka Yusuke <so...@tnksoft.com>
Authored: Wed Apr 2 18:18:42 2014 +0900
Committer: Tanaka Yusuke <so...@tnksoft.com>
Committed: Wed Apr 2 18:18:42 2014 +0900
----------------------------------------------------------------------
src/windows8/FileProxy.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/5d88898d/src/windows8/FileProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/FileProxy.js b/src/windows8/FileProxy.js
index e564626..0675cd3 100644
--- a/src/windows8/FileProxy.js
+++ b/src/windows8/FileProxy.js
@@ -157,7 +157,11 @@ module.exports = {
return stream.readAsync(buffer, readSize, Windows.Storage.Streams.InputStreamOptions.none);
}).done(function(buffer) {
- win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding, buffer));
+ try{
+ win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding, buffer));
+ } catch (e) {
+ fail && fail(FileError.ENCODING_ERR);
+ }
},function() {
fail && fail(FileError.NOT_FOUND_ERR);
});
[5/5] git commit: Merge branch 'patch-1' of
https://github.com/EionRobb/cordova-plugin-file
Posted by pu...@apache.org.
Merge branch 'patch-1' of https://github.com/EionRobb/cordova-plugin-file
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/41d41839
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/41d41839
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/41d41839
Branch: refs/heads/master
Commit: 41d4183988142fae6dcd37a33cfab1d0beb0910e
Parents: ac509b1 5ddef30
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Jun 16 16:42:00 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Jun 16 16:42:00 2014 -0700
----------------------------------------------------------------------
src/windows8/FileProxy.js | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/41d41839/src/windows8/FileProxy.js
----------------------------------------------------------------------
[4/5] git commit: Cleanup pull-reqs. This closes #34
Posted by pu...@apache.org.
Cleanup pull-reqs. This closes #34
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/ac509b16
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/ac509b16
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/ac509b16
Branch: refs/heads/master
Commit: ac509b16ccc852fa32c6e2d40a1c5b15c8610cec
Parents: 8c42eb7
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Jun 16 16:04:39 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Jun 16 16:04:39 2014 -0700
----------------------------------------------------------------------
RELEASENOTES.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/ac509b16/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index d1fc57c..ddcaa01 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -19,7 +19,7 @@
#
-->
# Release Notes
-
+
### 0.2.1 (Sept 5, 2013)
* [CB-4656] Don't add newlines in data urls within readAsDataUrl.
* [CB-4514] Making DirectoryCopy Recursive
[2/5] git commit: Add win8 support for readAsBinaryString and
readAsArrayBuffer
Posted by pu...@apache.org.
Add win8 support for readAsBinaryString and readAsArrayBuffer
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/5ddef30e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/5ddef30e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/5ddef30e
Branch: refs/heads/master
Commit: 5ddef30ef6f60e2fb1aa13f82984448dba838093
Parents: 2396549
Author: Eion Robb <ei...@robbmob.com>
Authored: Fri Jun 13 09:09:30 2014 +1200
Committer: Eion Robb <ei...@robbmob.com>
Committed: Fri Jun 13 09:09:30 2014 +1200
----------------------------------------------------------------------
src/windows8/FileProxy.js | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/5ddef30e/src/windows8/FileProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/FileProxy.js b/src/windows8/FileProxy.js
index 93be55b..8e1b85d 100644
--- a/src/windows8/FileProxy.js
+++ b/src/windows8/FileProxy.js
@@ -187,6 +187,47 @@ module.exports = {
);
},
+ readAsBinaryString:function(win,fail,args) {
+ var fileName = args[0];
+
+
+ Windows.Storage.StorageFile.getFileFromPathAsync(fileName).then(
+ function (storageFile) {
+ Windows.Storage.FileIO.readBufferAsync(storageFile).done(
+ function (buffer) {
+ var dataReader = Windows.Storage.Streams.DataReader.fromBuffer(buffer);
+ var fileContent = dataReader.readString(buffer.length);
+ dataReader.close();
+ win(fileContent);
+ }
+ );
+ }, function () {
+ fail && fail(FileError.NOT_FOUND_ERR);
+ }
+ );
+ },
+
+ readAsArrayBuffer:function(win,fail,args) {
+ var fileName = args[0];
+
+
+ Windows.Storage.StorageFile.getFileFromPathAsync(fileName).then(
+ function (storageFile) {
+ var blob = MSApp.createFileFromStorageFile(storageFile);
+ var url = URL.createObjectURL(blob, { oneTimeOnly: true });
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", url, true);
+ xhr.responseType = 'arraybuffer';
+ xhr.onload = function() {
+ win(xhr.response);
+ };
+ xhr.send();
+ }, function () {
+ fail && fail(FileError.NOT_FOUND_ERR);
+ }
+ );
+ },
+
getDirectory:function(win,fail,args) {
var fullPath = args[0];
var path = args[1];
[3/5] git commit: Merge branch 'patch-1' of
https://github.com/TNKSoftware/cordova-plugin-file
Posted by pu...@apache.org.
Merge branch 'patch-1' of https://github.com/TNKSoftware/cordova-plugin-file
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/8c42eb71
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/8c42eb71
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/8c42eb71
Branch: refs/heads/master
Commit: 8c42eb71d9d765bef43a28b74a5bed6c548a47d4
Parents: cbcd0f4 5d88898
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Jun 16 16:01:20 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Jun 16 16:01:20 2014 -0700
----------------------------------------------------------------------
src/windows8/FileProxy.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/8c42eb71/src/windows8/FileProxy.js
----------------------------------------------------------------------