code: public static void deleteIfExists(FileSystem fs, Path path, boolean recursive) throws IOException {
      if (fs.exists(path)) {
        deletePath(fs, path, recursive);
      }
    }
docs: A wrapper around {@link FileSystem#delete(Path, boolean)} that only deletes a given {@link Path} if it is present
  on the given {@link FileSystem}.