def get_matching_files(url, entry):
    """Given a search entry returned from PilotClient.get_search_entry, find
    all of the partial matches in the entry. Partial matches can happen if
    a base folder matches, but not the files below it. For example:
      * A url: http://example.com/files/foo
      * entry with files: http://example.com/files/foo/bar.txt
                          http://example.com/files/foo/moo.hdf5"""
    if entry and entry.get('files'):
        return [f for f in entry['files'] if url in f['url']]
    return []