cordova-plugin-file
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "cordova-plugin-file", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Cordova File Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -46,1 +46,7 @@ <!-- | ||
* CB-4504: Updating FileUtils.java to compensate for Java porting failures in the Android SDK. This fails because Java knows nothing about android_asset not being an actual filesystem | ||
### 0.2.5 (Oct 28, 2013) | ||
* CB-5129: Add a consistent filesystem attribute to FileEntry and DirectoryEntry objects | ||
* CB-5128: added repo + issue tag to plugin.xml for file plugin | ||
* CB-5015 [BlackBerry10] Add missing dependency for File.slice | ||
* [CB-5010] Incremented plugin version on dev branch. |
@@ -22,2 +22,4 @@ /* | ||
var fileUtils = require('./BB10Utils'); | ||
/** | ||
@@ -24,0 +26,0 @@ * Constructor. |
@@ -36,6 +36,6 @@ /* | ||
* {DOMString} fullPath the absolute full path to the directory (readonly) | ||
* TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly) | ||
* {FileSystem} filesystem on which the directory resides (readonly) | ||
*/ | ||
var DirectoryEntry = function(name, fullPath) { | ||
DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath); | ||
var DirectoryEntry = function(name, fullPath, fileSystem) { | ||
DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath, fileSystem); | ||
}; | ||
@@ -62,4 +62,5 @@ | ||
argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments); | ||
var fs = this.filesystem; | ||
var win = successCallback && function(result) { | ||
var entry = new DirectoryEntry(result.name, result.fullPath); | ||
var entry = new DirectoryEntry(result.name, result.fullPath, fs); | ||
successCallback(entry); | ||
@@ -97,5 +98,6 @@ }; | ||
argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments); | ||
var fs = this.filesystem; | ||
var win = successCallback && function(result) { | ||
var FileEntry = require('./FileEntry'); | ||
var entry = new FileEntry(result.name, result.fullPath); | ||
var entry = new FileEntry(result.name, result.fullPath, fs); | ||
successCallback(entry); | ||
@@ -102,0 +104,0 @@ }; |
@@ -40,2 +40,5 @@ /* | ||
* (readonly) | ||
* @param fileSystem | ||
* {FileSystem} the filesystem on which this entry resides | ||
* (readonly) | ||
*/ | ||
@@ -111,3 +114,3 @@ function Entry(isFile, isDirectory, name, fullPath, fileSystem) { | ||
// create appropriate Entry object | ||
var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath) : new (require('org.apache.cordova.file.FileEntry'))(entry.name, entry.fullPath); | ||
var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, entry.filesystem) : new (require('org.apache.cordova.file.FileEntry'))(entry.name, entry.fullPath, entry.filesystem); | ||
successCallback(result); | ||
@@ -153,3 +156,3 @@ } | ||
// create appropriate Entry object | ||
var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath) : new (require('org.apache.cordova.file.FileEntry'))(entry.name, entry.fullPath); | ||
var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, entry.filesystem) : new (require('org.apache.cordova.file.FileEntry'))(entry.name, entry.fullPath, entry.filesystem); | ||
successCallback(result); | ||
@@ -212,5 +215,6 @@ } | ||
argscheck.checkArgs('FF', 'Entry.getParent', arguments); | ||
var fs = this.filesystem; | ||
var win = successCallback && function(result) { | ||
var DirectoryEntry = require('./DirectoryEntry'); | ||
var entry = new DirectoryEntry(result.name, result.fullPath); | ||
var entry = new DirectoryEntry(result.name, result.fullPath, fs); | ||
successCallback(entry); | ||
@@ -217,0 +221,0 @@ }; |
@@ -38,4 +38,4 @@ /* | ||
*/ | ||
var FileEntry = function(name, fullPath) { | ||
FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]); | ||
var FileEntry = function(name, fullPath, fileSystem) { | ||
FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath, fileSystem]); | ||
}; | ||
@@ -42,0 +42,0 @@ |
@@ -34,3 +34,3 @@ /* | ||
if (root) { | ||
this.root = new DirectoryEntry(root.name, root.fullPath); | ||
this.root = new DirectoryEntry(root.name, root.fullPath, this); | ||
} | ||
@@ -37,0 +37,0 @@ }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
684389
9394
46598
1