Currently there is no way for the user to retrieve the paths of standard locations in a cross-platform way.
I agree. This is actually a fairly common need. I've had to implement things like this for various personal and work related, cross platform, projects multiple times - it would be nice if the SFML system module provided some of the basic stuff.
One can check the environment variables using std::getenv() but often times you wouldn't be able to use their values directly without a bit more information about the target system.
Environment variables contain a lot of useful information, but even on POSIX systems what is available and what they contain differs. As you say, it is essential to know what system you are on before using them. Some could probably be used in OS specific implementation of SFML functions though.
Other examples of useful paths might be: The current working directory,
Yes, the current working directory is useful, but is also one of the easier ones that might not necessarily need a SFML wrapper (although it might be convenient) since I believe all supported platforms (even Windows) supports the getcwd() function. But GetCurrentDirectory() might be a better choice on Windows, so yeah, maybe it ought to be wrapped.
a directory where temporary data can be stored,
Doesn't getenv("TMP") get you this on all supported platforms? I know Windows prefers TEMP, but it still sets/supports TMP as well IIRC.
But yes, I agree, a useful path for apps to know regardless of how SFML obtains it.
the location where fonts are installed (yes... currently if you wanted to use installed fonts you would have a lot of pre-processor in your code).
Certainly also useful.
Another path that may be useful to an application that we could consider providing is the path to the executable currently running. That's often useful to find resources located in a directory relative to your executable; On Linux (and Android I'd assume) you'd read the target of the /proc/self/exe symlink, on Windows you'd call GetModuleFileName(), on OS X _NSGetExecutablePath() gets the job done, FreeBSD has a sysctl for the purpose etc etc - all systems provide a way to get the path but they are all different which makes this an obvious candidate for something SFML could provide.