def get_unignored_file_paths(cls): config = cls.get_config() unignored_files = [] for root, dirs, files in os.walk("."): logger.debug("Root:%s, Dirs:%s", root, dirs) if cls.is_ignored(unix_style_path(root), config): dirs[:] = [] logger.debug("Ignoring directory : %s", root) continue for file_name in files: file_path = unix_style_path(os.path.join(root, file_name)) if cls.is_ignored(file_path, config): logger.debug("Ignoring file : %s", file_name) continue unignored_files.append(os.path.join(root, file_name)) return unignored_files
def get_unignored_file_paths(cls, ignore_list=None, white_list=None): config = cls.get_config() ignore_list = ignore_list or config[0] white_list = white_list or config[1] unignored_files = [] for root, dirs, files in os.walk("."): logger.debug("Root:%s, Dirs:%s", root, dirs) if cls.ignore_path(unix_style_path(root), ignore_list, white_list): dirs[:] = [] logger.debug("Ignoring directory : %s", root) continue for file_name in files: file_path = unix_style_path(os.path.join(root, file_name)) if cls.ignore_path(file_path, ignore_list, white_list): logger.debug("Ignoring file : %s", file_name) continue unignored_files.append(os.path.join(root, file_name)) return unignored_files