'Finds a requested static file in a location, returning the found
absolute path (or ``None`` if no match).'

def find_location(self, root, path, prefix=None):

    if prefix:
        prefix = ('%s%s' % (prefix, os.sep))
        if (not path.startswith(prefix)):
            return None
        path = path[len(prefix):]
    path = safe_join(root, path)
    if os.path.exists(path):
        return path
