question: public static BigInteger sizeOfDirectoryAsBigInteger ( File directory ) { checkDirectory ( directory ) ; final File [ ] files = directory . listFiles ( ) ; if ( files == null ) { return BigInteger . ZERO ; } BigInteger size = BigInteger . ZERO ; for ( final File file : files ) { try { if ( ! isSymlink ( file ) ) { size = size . add ( BigInteger . valueOf ( sizeOf ( file ) ) ) ; } } catch ( IOException ioe ) { } } return size ; }
target:  Counts the size of a directory recursively (sum of the length of all files).