public static long sizeOf(Path path) throws IOException {
    SizeVisitor visitor = new SizeVisitor();
    Files.walkFileTree(path, visitor);
    return visitor.size;
  }
@Test
  public void sizeOf_is_zero_on_empty_files() throws IOException {
    File file = temporaryFolder.newFile();

    assertThat(FileUtils2.sizeOf(file.toPath())).isZero();
  }