def path_expander(self, pattern=None, client=None):
        # TODO: enhance security by allowing only some paths
        # (ie. remove '..' if needed) os.path.normpath
        if not pattern:
            return []
        if not pattern.startswith('/'):
            if client:
                pattern = os.path.join(self.clientconfdir, pattern)
            else:
                pattern = os.path.join(self.root, pattern)
        if not re.search('\?|\*|\[.*\]', pattern):
            return [pattern]
        else:
            return [
                x for x in glob(pattern)
                if os.path.isfile(x) and not x.endswith('~')
            ]
See :func:`burpui.misc.parser.interface.BUIparser.path_expander`
dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/parser/burp1.py/Parser.path_expander