public static long getDirLogicalSize ( List < FileStatus > lfs ) { long totalSize = 0L ; if ( null == lfs ) { return totalSize ; } for ( FileStatus fsStat : lfs ) { totalSize += fsStat . getLen ( ) ; } return totalSize ; }
Get the total logical size in the directory