The path-like protocol could be expanded once we add AbstractPath
. It currently covers two use cases:
- You need a string because you’re doing string manipulation (e.g.
os.path.join()
) - You need a string because you’re going to use an OS API (e.g.
os.readlink()
)
At the moment these use cases are unified, so there is no issue. When we introduce AbstractPath
we may want to introduce the distinction in the API. See this cloudpathlib issue for more.
It’s not directly relevant to moving shutil
things, but only indirectly via the association I’ve made with the AbstractPath
work.