语言

Menu
Sites
Language
Regarding usage of FileFilter

 

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");

}

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

1 回复
Lakshmi Grandhi
Hi Muditha, File Filter is not working properly in current SDK, there is alreay bug in JIRA https://bugs.tizen.org/jira/browse/TDIST-157 May be they will reolve in SDK 2.0