check_relpath
- pydriosm.utils.check_relpath(pathname, start='.')[source]
Check and return a relative pathname to the given
pathname
.On Windows, when
pathname
andstart
are on different drives, the function returns the givenpathname
.- Parameters:
pathname (str | os.PathLike[str]) – pathname of a file or a directory
start (str | os.PathLike[str]) – optional start directory, defaults to
os.curdir
(i.e. the current working directory)
- Returns:
relative pathname to the given
pathname
- Type:
str | os.PathLike[str]