def ignore_file(file, ignore):
    """
    Ignores file if the file is within any of the user specified directories

    :param file: str, path to a file
    :param ignore: list, directories to ignore
    :return: bool, True if the directory is in the file path, False otherwise
    """
    for directory in ignore:
        if directory in file:
            return True
    return False