In Python 3.7 or higher I want to test two pathlib.Path objects p1
and p2
for casefolded equality. Written out I want the result of
str(p1).casefold() == str(p2).casefold()
Is there a built-in function or operator for this? Or an easier/shorter way to test this?
ps: I need this on macOS, but a general solution for PosixPath
and for WindowsPath
is preferred.