shamo.utils.path.get_relative_path

shamo.utils.path.get_relative_path(ref, path)[source]

Return the relative path from the reference to a file or directory.

Parameters
refstr, byte or os.PathLike

The path to the reference file or directory.

pathstr, byte or os.PathLike

The path to the file or directory to compute the relative path for.

Returns
pathlib.Path

The relative path to the file or directory.