cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [5/5] git commit: JS fixes
Date Wed, 19 Feb 2014 17:36:28 GMT
JS fixes


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/bd4eba6b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/bd4eba6b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/bd4eba6b

Branch: refs/heads/file-extras-rewrite
Commit: bd4eba6b7e0ada2472a9a2c79aaa3f9e34af1f1f
Parents: 00d3076
Author: Ian Clelland <iclelland@chromium.org>
Authored: Wed Feb 19 11:53:14 2014 -0500
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Wed Feb 19 12:34:52 2014 -0500

----------------------------------------------------------------------
 file-system-roots/filesystemroots.js | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/bd4eba6b/file-system-roots/filesystemroots.js
----------------------------------------------------------------------
diff --git a/file-system-roots/filesystemroots.js b/file-system-roots/filesystemroots.js
index bfa40be..fa51afb 100644
--- a/file-system-roots/filesystemroots.js
+++ b/file-system-roots/filesystemroots.js
@@ -20,7 +20,6 @@
 
 var exec = require('cordova/exec');
 var argscheck = require('cordova/argscheck');
-var DirectoryEntry = require('org.apache.cordova.file.DirectoryEntry');
 
 
 // Open Discussion:
@@ -48,7 +47,7 @@ var Purpose = {
  * Supplies a DirectoryEntry that matches the given constraints to the given callback.
  */
 exports.getDirectoryForPurpose = function(purpose, options, successCallback, failureCallback)
{
-    argscheck.checkArgs('sOfF', 'fileextras.getDirectoryForPurpose', arguments);
+    argscheck.checkArgs('sOfF', 'cordova.filesystem.getDirectoryForPurpose', arguments);
     var augmentedSuccessCallback = successCallback && function(fullPath) {
         resolveLocalFileSystemURL(fullPath, successCallback, failureCallback);
     };
@@ -63,11 +62,11 @@ exports.getDirectoryForPurpose = function(purpose, options, successCallback,
fai
     var syncable = typeof options.syncable == 'undefined' ? true : !!options.syncable;
 
     var args = [purposeInt, sandboxed, syncable];
-    exec(augmentedSuccessCallback, failureCallback, "FileExtras", "getDirectoryForPurpose",
args);
+    exec(augmentedSuccessCallback, failureCallback, "FileSystemRoots", "getDirectoryForPurpose",
args);
 };
 
 exports.getDataDirectory = function(syncable, successCallback) {
-    argscheck.checkArgs('*f', 'fileextras.getDataDirectory', arguments);
+    argscheck.checkArgs('*f', 'cordova.filesystem.getDataDirectory', arguments);
     exports.getDirectoryForPurpose('data', { syncable: syncable }, successCallback);
 };
 
@@ -84,7 +83,7 @@ exports.getCacheDirectory = function(successCallback) {
     exports.getDirectoryForPurpose('cache', null, successCallback);
 };
 
-exports.getFilesystemRoot = function(filesystemName, successCallback, failureCallback) {
-    argscheck.checkArgs('sfF', 'fileextras.getFilesystemRoot', arguments);
-    resolveLocalFileSystemURL('cdvfile://localhost/'+filesystemName+'/', successCallback,
failureCallback);
+exports.getFileSystemRoot = function(fileSystemName, successCallback, failureCallback) {
+    argscheck.checkArgs('sfF', 'cordova.filesystem.getFileSystemRoot', arguments);
+    resolveLocalFileSystemURL('cdvfile://localhost/'+fileSystemName+'/', successCallback,
failureCallback);
 };


Mime
View raw message