public static function current($env = false)
    {
        if ($env || (false === ($cwd = getcwd()))) {
            if (isset($_SERVER['PWD'])) {
                $cwd = $_SERVER['PWD'];
            } elseif (isset($_SERVER['CD'])) {
                $cwd = $_SERVER['CD'];
            } else {
                throw new PathException('The current working directory path could not be found.');
            }
        }

        return $cwd;
    }