Delete image file

Delete image file

BY 16 Oct 2013 Web Application Development

I’m trying to delete an image file with this code:

tizen.filesystem.resolve(
               ‘file://’ + path, 
               function(dir){
                 console.log(‘delete: ‘ + dir);
                 dir.deleteFile(
                         ‘file://’ + filename,
                         function(){
                           console.log(“File Deleted”);
                         }, function(e) {
                           console.log(“Error delete file: ” + e.message);
                         });
               }, function(e){
                 console.log(“Error” + e.message);
               }, “rw”
             );

File is succesfully deleted. But when I open a standart gallery app from my program, deleted file is still available (it is counted, but no preview image). If I restart emulator than everything is fine (file not counted in gallery app and all preview are ok).

How can I refresh image list for gallery app from my programm?

Written by