def path2filepath(path, config=None):
    """
    Transform an absolute path to a relative filepath.

    Parameters
    ----------
    path: Path
        Absolute resolved path

    Returns
    -------
    filepath: str
        Relative filepath
    """
    root = config.root if config else ""
    if len(root) > 0 and root[-1] != "/":
        root += "/"
    return str(path).replace(root, "")