Description
Right now, given a user-provided file path, there's no (efficient) way of getting that file's real path on disk. On Linux et al these are always the same thing (modulo .
and ..
path components which p.normalize()
can handle), but Windows and some OS X systems have case-insensitive filesystems where a file named FILE.TXT
can be referred to by the path file.txt
. Worse yet, some servers appear to only serve the files in question if the case matches exactly, even when the underlying filesystem is case sensitive (see sass/dart-sass#540).
It's possible to work around this today using Directory.list()
on the parent directory, but that's much more expensive than a single call. I believe you can use FindFirstFileA
for this on Windows and fcntl
with F_GETPATH
on Unixes.