I'm working on a project that deals with files and I had difficult time trying to delete a file. Luckily, it was working and it still works for me.
The problem I had was I was trying to delete a file that is empty:
file.length()==0
So I solved my problem but I'm still left with a question.
file.length()
returns 0 in both cases
- The size is actually zero
- The
file
does not exist in the path
So How am i supposed to eliminate the files that have 0 size in my file explorer. I have too many files with size 0 and I want to erase them from my /files/
.
Yes, I tried selecting on the file and clicking on red X several times, but I guess eclipse does not read file with 0 size. With AVD, I could make a new AVD and launch it with formatted setting, but in real life, you can't just buy a new phone to get rid of files with size 0.
Help me how to do this on ECLIPSE please
Thank you