code: def listdir(self, path='.'):
          
          self._connect()
  
          if self.sftp:
              contents = self._sftp_listdir(path)
          else:
              contents = self._ftp_listdir(path)
  
          self._close()
  
          return contents
docs: Gets an list of the contents of path in (s)FTP