trueCasePathSync(<fileSystemPath>)
Given a possibly case-variant version of an existing filesystem path, returns
the case-exact, normalized version as stored in the filesystem.
If the input path is a globbing pattern as defined by the 'glob' npm
package, only the 1st match, if any, is returned.
Only a literal input path guarantees an unambiguous result.
If no matching path exists, undefined is returned.
On case-SENSITIVE filesystems, a match will also be found, but if case
variations of a given path exist, it is undefined which match is returned.
Windows, OSX, and Linux (though note the limitations with case-insensitive filesystems).
'./' are acceptable, but paths starting with '../'fs.realPathSync() first.'.' and interior '..' instances are normalized, but a relativefs.realPathSync() to the result.const trueCasePathSync = require('true-case-path')
trueCasePathSync('/users/guest') // OSX: -> '/Users/Guest'
trueCasePathSync('c:\\users\\all users') // Windows: -> 'c:\Users\All Users'
The code for this project was sourced from http://stackoverflow.com/a/33139702/45375