2 namespace Consolidation\SiteAlias\Util;
4 use Symfony\Component\Filesystem\Filesystem;
5 use Webmozart\PathUtil\Path;
10 * Returns canonicalized absolute pathname.
12 * The difference between this and PHP's realpath() is that this will
13 * return the original path even if it doesn't exist.
16 * The path being checked.
19 * The canonicalized absolute pathname.
21 public static function realpath($path)
23 $realpath = realpath($path);
24 return $realpath ?: $path;