VersionPress\Utils\PathUtils::windowsFix PHP 메소드

windowsFix() 개인적인 정적인 메소드

Converts '\' to '/' and makes disk drive (e.g., C:) case insensitive
private static windowsFix ( string $path ) : string
$path string
리턴 string
    private static function windowsFix($path)
    {
        $path = str_replace('\\', '/', $path);
        // https://regex101.com/r/RRtZKq/2
        if (preg_match('/^(\\w)(\\:.*)/', $path, $matches)) {
            $path = strtolower($matches[1]) . $matches[2];
        }
        return $path;
    }