I am developing a small application for creating and maintaining monthly backups. Here I want to get the size of the folder to check if there is enough free space on the target disk or not. I move the directory structure once to take a backup (copy the same dir structure.) Now, to find the size, as I mentioned, I don't want to use recursion. Is there any other simpler method?
Thanks to all of you, I finally used org.apache.commons.io.FileUtils to complete the task after all this package also uses recursion.
source share