code: def exists(self, path):
          
          import hdfs
          try:
              self.client.status(path)
              return True
          except hdfs.util.HdfsError as e:
              if str(e).startswith('File does not exist: '):
                  return False
              else:
                  raise e
docs: Returns true if the path exists and false otherwise.