code: @Nonnegative
      public static int fsyncRecursive(final Path root) throws IOException {
          final FsyncingSimpleFileVisitor visitor = new FsyncingSimpleFileVisitor();
          Files.walkFileTree(root, visitor);
          return visitor.getFileCount();
      }
docs: Walk a directory tree and Fsync both Directory and File inodes. This does NOT follow symlinks and does not
  attempt to fsync anything other than Directory or NormalFiles.
  
  @param root directory to start the traversal.
  @return number of NormalFiles fsynced (not including directories).
  @throws IOException in the event that we could not fsync the provided directory.