def split_endpoint_timestamp(file):
    """Split a file into the endpoint and timestamp part.

    Parameters
    ----------
    file : pathlib.Path
        Can be a dated file or a link.

    Returns
    -------
    str, str
        endpoint name and timestamp
    """
    endpoint, date, time = file.resolve().stem.rsplit("_", 2)
    return endpoint, date + "_" + time