code: public boolean exists(Path filename) throws IOException {
      try {
        return getMfs().listFiles(filename, true).hasNext();
      } catch (FileNotFoundException e) {
        return false;
      }
    }
docs: Checks if the given path exists on Hadoop.
  
  @param filename Filename to check
  @throws IOException Anything
  @return true if the file exists