We are using the following method to search image file in images folder on phone/emulator. The specified file exists on the location.
It is not giving any result, neither error nor success.
We just wanted to know if this is the correct usage of FileFilter, or there is some problem in the framework.
//Search implementation
…
…
tizen.filesystem.resolve(
"images",
function(dir)
{
var ff = new tizen.filefilter ("image12.jpg", null, null, null, null);
dir.listFiles(successCB, errorCB, ff);
}, function(e){
alert("Error " + e.message);
}, "r"
);
…
…
//Callback methods
function successCB(files) {
alert("success ");
alert("There are " + files.length + "files in the selected folder");
for (var i = 0; i < files.length; i++) {
if (files[i].isDirectory == true) {
alert("directory name : " + files[i].name);
}
else {
alert("file name : " + files[i].name);
}
}
}
function errorCB(error) {
alert("The error " + error.message + " occurred when listing the files in the selected folder");
}