Directory Size in java code example
How to get Directory Size in java code example? public static long getDirectorySize(String directoryPath) { dirSize = 0L; dirSize = calDirectorySize(directoryPath); return dirSize; } private static long calDirectorySize(String directoryPath) { File fd = new File(directoryPath); if(!fd.isFile()) { String list[] = fd.list(); for(int i = 0; i < list.length; i++) { Stri...