public static long size(Path path) {
    return Files.isDirectory(path) ? directorySize(path) : fileSize(path);
  }
Returns the size of a directory or file at {@code path} or 0 if missing/inaccessible.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/FileUtils.java