: Path equality and path equivalence have different semantics
. Equality is determined by the
path non-member
operator==,
which considers the two paths' lexical representations only
. [
Example: path("foo") == "bar" is never
true. —
end example ]
Equivalence is determined by the
equivalent() non-member function, which
determines if two paths resolve (
[fs.class.path]) to the same file system entity
. [
Example: equivalent("foo", "bar") will be
true when both paths resolve to the same file
. —
end example ]
Programmers wishing to determine if two paths are “the same” must decide if
“the same” means “the same representation” or “resolve to the same actual
file”, and choose the appropriate function accordingly. —
end note