public static function windows_dir(string $path)
    {
        $path = str_replace('/', '\\', $path);
        $path = preg_replace('|(?<=.)/+|', '\\', $path);
        if (':' === substr($path, 1, 1)) {
            $path = ucfirst($path);
        }
        return $path;
    }