stdlib
stdlib copied to clipboard
feat: path functions `is_abs` and `abs_path`
User facing functions added are:
is_abs(path): returns alogicalindicating if the path is absolute.abs_path(path [, err]): returns the absolutized version of the path.
is_abs does pure string manipulation checking if
- on POSIX systems,
pathstarts with/ - on Windows systems it is either an
UNCpath or starts with a drive letter likeC:\
abs_path performs a syscall to get the current working directory and then joins it to the path, returning the joined path
Prior Art
os.path.abspath (Python)
os.path.isabs (Python)
I had that in mind too @sebastian-mutz, and I have changed it now.