There are many examples of resolving the path of a file while following symlinks, and I'd like to get the absolute path to a file without resolving symlinks. I think this is the solutions:
ex=Path('example.txt')
abs_ex = ex.parent.resolve()/ex
Is there something I'm missing in terms of another function or argument to resolve()
?
There is an answer regarding using os.path.abspath but I'm asking about pathlib in Python 3.6 or better.