This question is locked. New answers and comments are not allowed.
Hi,
I am using Graphite on PC and ION on Ipad 4. Trying to browse all photos in the device. Used cordova api for working with files:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, onFail);
function gotFS(fileSystem) {
var dir = new DirectoryEntry("Media", "/var/mobile/Media/DCIM");
var dirReader = dir.createReader();
dirReader.readEntries(onReadEntries,onError);
}
function onReadEntries(entries) {
var i;
for (i = 0; i < entries.length; i++)
{
if (entries[i].isFile == true)
{
// ...
}
if (entries[i].isDirectory == true)
{
alert(entries[i].fullPath);
var directoryReader = entries[i].fullPath.createReader();
directoryReader.readEntries(onReadEntries, fail);
}
}
}
There is an error on createReader() method. It works only for specific folders like /var/mobile/Applications but not for Library, Media etc
I am not sure that this problem is related with icenium or cordova script. Read that there is a new version for cordova 2.5 so when you will be able to provide plugin for it.
Kind Regards,
Plamen
I am using Graphite on PC and ION on Ipad 4. Trying to browse all photos in the device. Used cordova api for working with files:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, onFail);
function gotFS(fileSystem) {
var dir = new DirectoryEntry("Media", "/var/mobile/Media/DCIM");
var dirReader = dir.createReader();
dirReader.readEntries(onReadEntries,onError);
}
function onReadEntries(entries) {
var i;
for (i = 0; i < entries.length; i++)
{
if (entries[i].isFile == true)
{
// ...
}
if (entries[i].isDirectory == true)
{
alert(entries[i].fullPath);
var directoryReader = entries[i].fullPath.createReader();
directoryReader.readEntries(onReadEntries, fail);
}
}
}
There is an error on createReader() method. It works only for specific folders like /var/mobile/Applications but not for Library, Media etc
I am not sure that this problem is related with icenium or cordova script. Read that there is a new version for cordova 2.5 so when you will be able to provide plugin for it.
Kind Regards,
Plamen