private function expandPath($path)
    {
        if (0 === strspn($path, '\\/', 0, 1) || null === parse_url($path, PHP_URL_PATH)) {
            $path = $this->cwd.DIRECTORY_SEPARATOR.$path;
        }

        return realpath($path);
    }