You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "dharmendra sharma (JIRA)" <ji...@apache.org> on 2016/03/16 11:09:33 UTC

[jira] [Commented] (CB-10293) Using cordova-plugin-file fileEntry.remove() - get a success callback, file is removed but application size stays the same

    [ https://issues.apache.org/jira/browse/CB-10293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15197132#comment-15197132 ] 

dharmendra sharma commented on CB-10293:
----------------------------------------

Not sure how this issue related with File plugin .

> Using cordova-plugin-file fileEntry.remove() - get a success callback, file is removed but application size stays the same
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-10293
>                 URL: https://issues.apache.org/jira/browse/CB-10293
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>         Environment: Android 5.x
>            Reporter: Severin Deutschmann
>              Labels: Android, triaged
>
> Removing a file with:
> function deleteFile(filePath) {
>     var pathToFile = cordova.file.applicationStorageDirectory + "cache" + filePath;
>     window.resolveLocalFileSystemURL(pathToFile, function (fileEntry) {
>       fileEntry.remove(function () {
>         console.log("File removed with the path: " +  pathToFile)
>       }, errorHandler.bind(null, filePath));
>     }, errorHandler.bind(null, filePath));
>   }
> This seems to work, because I get a success callback and when I search the directory with a directoryReader I see that the files are removed. Everything checks out except that the file size in the android application manager stays the same.
> e.g. a file gets added to the cache/ directory in the applicationStorageDirectory. It's 1mb big. I check the application manager and the temporary files got 1mb bigger. I check with directoryReader and I see the file.
> The I delete the file with above mentioned function. No errors, just a success callback. I check again with directoryReader, the file is gone.
> But the temporary files are still 1mb bigger than before even though the file should have been deleted.
> I flagged this as major as I don't have found a workaround



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org