I am on macOS (where file names are case insensitive) and I need to find out the actual case-correct name of a file. For example I do not know whether my file has name A.txt or a.txt or A.TXT or a.TXT etc. I want to display the name correctly on the screen.
What is the fastest way in C/C++?
UPDATE: I tried <filesystem>
and Qt framework too (my application is in Qt). But the only possible solution with these libraries seem to be to read full list all entries in the parent directory and then compare if any of these child items matches to the given name pattern. This is obviously not viable for performance reasons.