In my application I have a directory where I keep images temporarily. I would like to be able to delete the images from this directory when it reaches a certain size. I don't need it to delete the oldest first or anything like that. I just need to keep the size in check.
This is what I have:
It does not seem to be working. I get a message in the LogCat that files were deleted, but when I check the files are still there. Any help with what i'm missing would be appreciated.