from pathlib import Path


def is_source_file(file_path: str, extensions: list) -> bool:
    """
    Check if given path represents source file (based by extensions provided by user).
    :param file_path: file path to check.
    :param extensions: list of possible extensions for source files.
    :return: true, if given path is source file, otherwise returns false.
    """

    path = Path(file_path)
    return path.is_file() and path.suffix[1:] in extensions and len(path.suffixes) == 1