docs: def getkeys(self, path, filename=None, directories=False, recursive=False):
          """
          Get matching keys for a path
          """
          from .utils import connection_with_anon, connection_with_gs
  
          parse = BotoClient.parse_query(path)
  
          scheme = parse[0]
          bucket_name = parse[1]
          key = parse[2]
  
          if scheme == 's3' or scheme == 's3n':
              conn = connection_with_anon(self.credentials)
              bucket = conn.get_bucket(bucket_name)
          elif scheme == 'gs':
              conn = connection_with_gs(bucket_name)
              bucket = conn.get_bucket()
          else:
              raise NotImplementedError("No file reader implementation for URL scheme " + scheme)
  
          if filename:
              if not key.endswith("/"):
                  if self.check_prefix(bucket, key + "/"):
                      key += "/"
                  else:
                      index = key.rfind("/")
                      if index >= 0:
                          key = key[:(index+1)]
                      else:
                          key = ""
              key += filename
  
          keylist = BotoClient.retrieve_keys(bucket, key, prefix=parse[3], postfix=parse[4],
                                             directories=directories, recursive=recursive)
          return scheme, keylist