fs: introduce `dirent.parentPath`
The goal is to replace dirent.path
using a name that's less likely to create confusion. The value of dirent.path
used to be "the path to the file corresponding to the Dirent
", and is not "the path to the parent directory". IMO the name doesn't reflect that, using dirname
would be a better fit.
If this PR is accepted, I'll close https://github.com/nodejs/node/pull/50838 and open another PR to deprecate dirent.path
.