You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Severin Deutschmann (JIRA)" <ji...@apache.org> on 2016/01/04 20:51:40 UTC
[jira] [Created] (CB-10293) Using cordova-plugin-file
fileEntry.remove() - get a success callback, file is removed but
application size stays the same
Severin Deutschmann created CB-10293:
----------------------------------------
Summary: 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: Android, Plugin File
Environment: Android 5.x
Reporter: Severin Deutschmann
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