real_rel_path#
- real_rel_path(raw_path: Union[str, CloudPath, Path], start: Union[str, CloudPath, Path]) Union[CloudPath, Path] [source]#
Gives the real relative path from a starting folder. (and not just adding
../..
between the start and the target)>>> path = r'D:/_SERTIT_UTILS/sertit-utils/sertit' >>> start = os.path.join(".", "..", "..") >>> real_rel_path(path, start) 'sertit-utils/sertit'
- Parameters:
raw_path (AnyPathStrType) – Path to make relative
start (AnyPathStrType) – Start, the path being relative from this folder.
- Returns:
Relative path