def globfind()

in Shared_Processors/DirectoryList.py [0:0]


    def globfind(self, pattern):
        """Returns multiple files matching a glob."""
        # pylint: disable=no-self-use

        glob_matches = glob(pattern)

        if len(glob_matches) < 1:
            raise ProcessorError("No matching filename found")

        glob_matches.sort()

        # return glob_matches
        new_glob = []
        for glob_item in glob_matches:
            new_string = os.path.basename(glob_item)
            if self.env["remove_extension"]:
                new_string = os.path.splitext(new_string)[0]
            new_glob.append(new_string)
        return new_glob