A small problem with getting the real directory name for a file. I ran into this while investigating php-code-coverage's code.
On my system running Mac Os I have a structure like this:
/project/src/Directory/FileName.php
But if I call realpath()
like this (note directory name case):
realpath("project/src/directory/FileName.php")
it gives me:
<full_name>/project/src/directory/FileName.php
So the path is valid for Mac Os, but the directory name is in wrong case, so it is not a "real" realpath.
Is there any way to get a real path with valid cases for such path "project/src/directory/FileName.php"
? I've tried pathinfo()
also with no luck.