# Path: anchorhub/util/getfiles.py
# def get_files(dir, exts, exclude=None, recursive=False):
#     """
#     Get a list of files within a directory with given extensions.
#     Exclude/black list directories from the list if specified. By default,
#     the search is recursive, looking in all subdirectories of 'dir'
# 
#     :param dir: String root directory to search under. All subdirectories are
#         also searched by default
#     :param exts: List of string file extensions. Files inside of dir with
#         names ending with this string will be included in the list. Note: the
#         string does not strictly need to be a file extension (beginging with
#         a '.' dot), it could be the entire name of the file, or a common
#         suffix to files.
#     :param exclude: List of strings specifying directories that should not be
#         included in the output list
#     :param recursive: When True, search in all subdirectories, otherwise just
#         look in the current directory
#     :return: List of string directories
#     """
#     file_paths =[]
#     if recursive:
#         for root, _, _ in os.walk(dir):
#             # os.walk() does not add path separator by default to end of path
#             root = add_suffix(root, get_path_separator())
#             if exclude is not None and is_dir_inside(root, exclude):
#                 # Skip directories that are in the exclude list
#                 continue
#             file_paths.extend(get_files_in_dir(root, *exts))
#     else:
#         file_paths.extend(get_files_in_dir(dir, *exts))
#     return file_paths


import os.path
from anchorhub.util.getfiles import get_files
"""
fileparse.py - Functions for obtaining a list of string file paths according
to input options
"""



def get_file_list(opts):
    """
    Returns a list containing file paths of requested files to be parsed
    using AnchorHub options.

    :param opts: Namespace containing AnchorHub options, usually created from
        command line arguments
    :return: a list of absolute string file paths of files that should be
        parsed
    """
    if opts.is_dir:
        # Input is a directory, get a list of files

# Path: anchorhub/util/getfiles.py
# def get_files(dir, exts, exclude=None, recursive=False):
#     """
#     Get a list of files within a directory with given extensions.
#     Exclude/black list directories from the list if specified. By default,
#     the search is recursive, looking in all subdirectories of 'dir'
# 
#     :param dir: String root directory to search under. All subdirectories are
#         also searched by default
#     :param exts: List of string file extensions. Files inside of dir with
#         names ending with this string will be included in the list. Note: the
#         string does not strictly need to be a file extension (beginging with
#         a '.' dot), it could be the entire name of the file, or a common
#         suffix to files.
#     :param exclude: List of strings specifying directories that should not be
#         included in the output list
#     :param recursive: When True, search in all subdirectories, otherwise just
#         look in the current directory
#     :return: List of string directories
#     """
#     file_paths =[]
#     if recursive:
#         for root, _, _ in os.walk(dir):
#             # os.walk() does not add path separator by default to end of path
#             root = add_suffix(root, get_path_separator())
#             if exclude is not None and is_dir_inside(root, exclude):
#                 # Skip directories that are in the exclude list
#                 continue
#             file_paths.extend(get_files_in_dir(root, *exts))
#     else:
#         file_paths.extend(get_files_in_dir(dir, *exts))
#     return file_paths


# Path: anchorhub/fileparse.py
import os.path
from anchorhub.util.getfiles import get_files

"""
fileparse.py - Functions for obtaining a list of string file paths according
to input options
"""



def get_file_list(opts):
    """
    Returns a list containing file paths of requested files to be parsed
    using AnchorHub options.

    :param opts: Namespace containing AnchorHub options, usually created from
        command line arguments
    :return: a list of absolute string file paths of files that should be
        parsed
    """
    if opts.is_dir:
        # Input is a directory, get a list of files

        return get_files(opts.abs_input, opts.extensions, exclude=[