code: static long calculateDirSizeAndSave(final File dir) throws IOException {
      final Path path = Paths.get(dir.getPath(), FlowPreparer.PROJECT_DIR_SIZE_FILE_NAME);
      if (!Files.exists(path)) {
        final long sizeInByte = FileUtils.sizeOfDirectory(dir);
        FileIOUtils.dumpNumberToFile(path, sizeInByte);
        return sizeInByte;
      } else {
        return FileIOUtils.readNumberFromFile(path);
      }
    }
docs: Calculate the directory size and save it to a file.
  
  @param dir the directory whose size needs to be saved.
  @return the size of the dir.