cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dharmendra sharma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10293) Using cordova-plugin-file fileEntry.remove() - get a success callback, file is removed but application size stays the same
Date Wed, 16 Mar 2016 10:09:33 GMT

    [ 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


Mime
View raw message