def extract_files(self, resource):
        """
            :param resource str|iterable  files, a file or a directory
            @return: iterable
        """
        if hasattr(resource, "__iter__"):
            files = [file for file in resource if self.can_be_extracted(file)]
        elif os.path.isfile(resource):
            files = [resource] if self.can_be_extracted(resource) else []
        else:
            files = self._extract_from_directory(resource)

        return files
:param resource str|iterable  files, a file or a directory
            @return: iterable