code: public static void tar(FileSystem fs, Path sourcePath, Path destPath) throws IOException {
      tar(fs, fs, sourcePath, destPath);
    }
docs: Creates a tar gzip file using a given {@link Path} as input and a given {@link Path} as a destination. If the given
  input is a file then only that file will be added to tarball. If it is a directory then the entire directory will
  be recursively put into the tarball.
  
  @param fs the {@link FileSystem} the input exists, and the the output should be written to.
  @param sourcePath the {@link Path} of the input files, this can either be a file or a directory.
  @param destPath the {@link Path} that tarball should be written to.