You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/01/31 01:03:00 UTC

[1/2] git commit: [ubuntu] adopt to recent changes

Updated Branches:
  refs/heads/dev aa23cf422 -> e3d9ac12b


[ubuntu] adopt to recent changes


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/7544f3c0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/7544f3c0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/7544f3c0

Branch: refs/heads/dev
Commit: 7544f3c01215e9ab0afcca02b4b0ffc80d069acf
Parents: 3fe44cf
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Tue Jan 21 14:35:38 2014 +0400
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Tue Jan 21 14:35:38 2014 +0400

----------------------------------------------------------------------
 plugin.xml                   |  3 +++
 www/ubuntu/DirectoryEntry.js | 26 ++++++++++++++++++++++++++
 www/ubuntu/FileWriter.js     |  7 ++++++-
 3 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/7544f3c0/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index f5d215a..93be870 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -143,6 +143,9 @@ xmlns:android="http://schemas.android.com/apk/res/android"
         <js-module src="www/ubuntu/Entry.js" name="Entry1">
             <merges target="window.Entry" />
         </js-module>
+        <js-module src="www/ubuntu/DirectoryEntry.js" name="DirectoryEntry1">
+            <merges target="window.DirectoryEntry" />
+        </js-module>
         <js-module src="www/ubuntu/FileWriter.js" name="FileWriter1">
             <merges target="window.FileWriter" />
         </js-module>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/7544f3c0/www/ubuntu/DirectoryEntry.js
----------------------------------------------------------------------
diff --git a/www/ubuntu/DirectoryEntry.js b/www/ubuntu/DirectoryEntry.js
new file mode 100644
index 0000000..80949f0
--- /dev/null
+++ b/www/ubuntu/DirectoryEntry.js
@@ -0,0 +1,26 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+module.exports = {
+    createReader: function() {
+        return new DirectoryReader(this.fullPath);
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/7544f3c0/www/ubuntu/FileWriter.js
----------------------------------------------------------------------
diff --git a/www/ubuntu/FileWriter.js b/www/ubuntu/FileWriter.js
index 52a17fc..a75506b 100644
--- a/www/ubuntu/FileWriter.js
+++ b/www/ubuntu/FileWriter.js
@@ -70,6 +70,11 @@ function write(data) {
         data = binary;
     }
 
+    var prefix = "file://localhost";
+    var path = this.localURL;
+    if (path.substr(0, prefix.length) == prefix) {
+        path = path.substr(prefix.length);
+    }
     // Write file
     exec(
         // Success callback
@@ -120,7 +125,7 @@ function write(data) {
             if (typeof me.onwriteend === "function") {
                 me.onwriteend(new ProgressEvent("writeend", {"target":me}));
             }
-        }, "File", "write", [this.fileName, data, this.position, isBinary]);
+        }, "File", "write", [path, data, this.position, isBinary]);
 };
 
 module.exports = {


[2/2] git commit: Merge branch 'dev' of github.com:Zaspire/cordova-plugin-file into dev

Posted by st...@apache.org.
Merge branch 'dev' of github.com:Zaspire/cordova-plugin-file into dev


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/e3d9ac12
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/e3d9ac12
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/e3d9ac12

Branch: refs/heads/dev
Commit: e3d9ac12becaf8fc12d26b932121b464905a7349
Parents: aa23cf4 7544f3c
Author: Steven Gill <st...@gmail.com>
Authored: Thu Jan 30 16:02:36 2014 -0800
Committer: Steven Gill <st...@gmail.com>
Committed: Thu Jan 30 16:02:36 2014 -0800

----------------------------------------------------------------------
 plugin.xml                   |  3 +++
 www/ubuntu/DirectoryEntry.js | 26 ++++++++++++++++++++++++++
 www/ubuntu/FileWriter.js     |  7 ++++++-
 3 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------