Function: toWin32()
ts
function toWin32(path): string;将路径转换为 Windows 格式。
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | 要转换的路径 |
Returns
string
Windows 格式的路径
Example
ts
toWin32('/c/temp/foo/bar') // => 'C:\\temp\\foo\\bar'
toWin32('//server/share/foo') // => '\\\\server\\share\\foo'
toWin32('foo/bar/baz') // => 'foo\\bar\\baz'Since
1.0.0