You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Matti Eerola (JIRA)" <ji...@apache.org> on 2014/01/11 22:21:52 UTC
[jira] [Created] (CB-5774) Windows 8: DirectoryReader returns
isFile = true for directories
Matti Eerola created CB-5774:
--------------------------------
Summary: Windows 8: DirectoryReader returns isFile = true for directories
Key: CB-5774
URL: https://issues.apache.org/jira/browse/CB-5774
Project: Apache Cordova
Issue Type: Bug
Components: Plugin File, Windows 8
Affects Versions: 3.3.0
Environment: Windows 8.0
Reporter: Matti Eerola
Assignee: Jesse MacFadyen
Priority: Minor
All entries returned by DirectoryReader.readEntries have isFile set to true.
The expected result is that directories have isFile:false and isDirectory:true.
Here is a code sample that will show the error:
{code:javascript}
window.requestFileSystem(LocalFileSystem.PERSISTENT, 5 * 1024 * 1024 * 1024, function (fs) {
//Ensure that there is one directory in the root
fs.root.getDirectory('foo', { create: true }, function (newDir) {
//Use reader to get the directory
var reader = fs.root.createReader();
reader.readEntries(function (results) {
for (var i = 0; i < results.length; i++) {
if (results[i].name != "foo")
continue;
// foo should be directory
if (results[i].isFile)
throw "'foo' is a directory and isFile is true";
}
});
});
});
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)