private static long freeSpaceCalculation(String path){
  StatFs stat=new StatFs(path);
  long blockSize=stat.getBlockSize();
  long availableBlocks=stat.getAvailableBlocks();
  return availableBlocks * blockSize / 1024;
}

private static long freeSpaceCalculation ( String path ) { StatFs stat = new StatFs ( path ) ; long blockSize = stat . getBlockSize ( ) ; long availableBlocks = stat . getAvailableBlocks ( ) ; return availableBlocks * blockSize / 1024 ; }
given a path return the number of free kb
