def get_src_or_dst(mode, path_type):
    """
    User sets the path to a LiPD source location
    :param str mode: "read" or "write" mode
    :param str path_type: "directory" or "file"
    :return str path: dir path to files
    :return list files: files chosen
    """
    logger_directory.info("enter set_src_or_dst")
    _path = ""
    _files = ""
    invalid = True
    count = 0

    # Did you forget to enter a mode?
    if not mode:
        invalid = False

    # Special case for gui reading a single or multi-select file(s).
    elif mode == "read" and path_type == "file":
        _path, _files = browse_dialog_file()
        # Return early to skip prompts, since they're not needed
        return _path, _files

    # All other cases, prompt user to choose directory
    else:
        prompt = get_src_or_dst_prompt(mode)

    # Loop max of 3 times, then default to Downloads folder if too many failed attempts
    while invalid and prompt:
        # Prompt user to choose target path
        _path, count = get_src_or_dst_path(prompt, count)
        if _path:
            invalid = False

    logger_directory.info("exit set_src_or_dst")
    return _path, _files