relative_posix_path
- glotaran.utils.io.relative_posix_path(source_path: StrOrPath, base_path: StrOrPath | None = None) str[source]
Ensure that
source_pathis a posix path, relative tobase_pathif defined.On Windows if
source_pathandbase_pathare on different drives, it will return the absolute posix path to the file.- Parameters
source_path (StrOrPath) – Path which should be converted to a relative posix path.
base_path (StrOrPath, optional) – Base path the resulting path string should be relative to., by default None
- Returns
source_pathas posix path relative tobase_pathif defined.- Return type