import hashlib


def getFileSha256Hash(file: str) -> str:
    """
    Calculate the sha256 hash of a given file

    :param file: The full path to the file
    :return: string representing the file hash in sha256
    """
    sha256Hash = hashlib.sha256()
    with open(file, "rb") as f:
        for byteBlock in iter(lambda: f.read(4096), b""):
            sha256Hash.update(byteBlock)

    return sha256Hash.hexdigest()