from pathlib import Path


def str_file_read(file_path, encoding="utf-8"):
    """
    Returns a file's contents as a string.

    Parameters
    ----------
    file_path : str
        Path to GCA file to read
    encoding : str
        Encoding method to use. (Default: "utf-8)

    Returns
    -------
    contents : str
        The gca file's contents as a string
    """

    file_path = Path(file_path)

    # read egf file
    file_contents = file_path.read_text(encoding=encoding)

    return file_contents